home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / xlispst.cpt / XLisp-Stat ƒ / Disk 2 / glim / glim.tex < prev    next >
LaTeX Document  |  1991-01-11  |  39.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 7b 61 |\documen|tstyle{a|
|00000010| 72 74 69 63 6c 65 7d 0d | 0d 5c 6e 65 77 63 6f 6d |rticle}.|.\newcom|
|00000020| 6d 61 6e 64 7b 5c 72 65 | 66 69 74 65 6d 7d 5b 31 |mand{\re|fitem}[1|
|00000030| 5d 7b 25 0d 20 20 5c 62 | 65 67 69 6e 7b 6c 69 73 |]{%. \b|egin{lis|
|00000040| 74 7d 25 0d 20 20 20 20 | 20 20 20 20 7b 7d 25 0d |t}%. | {}%.|
|00000050| 20 20 20 20 20 20 20 20 | 7b 5c 73 65 74 6c 65 6e | |{\setlen|
|00000060| 67 74 68 7b 5c 6c 65 66 | 74 6d 61 72 67 69 6e 7d |gth{\lef|tmargin}|
|00000070| 7b 2e 32 35 69 6e 7d 5c | 73 65 74 6c 65 6e 67 74 |{.25in}\|setlengt|
|00000080| 68 7b 5c 69 74 65 6d 69 | 6e 64 65 6e 74 7d 7b 2d |h{\itemi|ndent}{-|
|00000090| 2e 32 35 69 6e 7d 7d 0d | 20 20 5c 69 74 65 6d 20 |.25in}}.| \item |
|000000a0| 23 31 25 0d 20 20 5c 65 | 6e 64 7b 6c 69 73 74 7d |#1%. \e|nd{list}|
|000000b0| 7d 0d 0d 5c 73 65 74 6c | 65 6e 67 74 68 7b 5c 74 |}..\setl|ength{\t|
|000000c0| 65 78 74 77 69 64 74 68 | 7d 7b 36 69 6e 7d 0d 5c |extwidth|}{6in}.\|
|000000d0| 73 65 74 6c 65 6e 67 74 | 68 7b 5c 74 65 78 74 68 |setlengt|h{\texth|
|000000e0| 65 69 67 68 74 7d 7b 38 | 2e 37 35 69 6e 7d 0d 5c |eight}{8|.75in}.\|
|000000f0| 73 65 74 6c 65 6e 67 74 | 68 7b 5c 74 6f 70 6d 61 |setlengt|h{\topma|
|00000100| 72 67 69 6e 7d 7b 2d 30 | 2e 32 35 69 6e 7d 0d 5c |rgin}{-0|.25in}.\|
|00000110| 73 65 74 6c 65 6e 67 74 | 68 7b 5c 6f 64 64 73 69 |setlengt|h{\oddsi|
|00000120| 64 65 6d 61 72 67 69 6e | 7d 7b 30 2e 32 35 69 6e |demargin|}{0.25in|
|00000130| 7d 0d 0d 25 20 54 68 69 | 73 20 63 6f 6d 6d 61 6e |}..% Thi|s comman|
|00000140| 64 20 65 6e 61 62 6c 65 | 73 20 68 79 70 68 65 6e |d enable|s hyphen|
|00000150| 61 74 69 6f 6e 20 69 66 | 20 5c 74 74 20 6d 6f 64 |ation if| \tt mod|
|00000160| 65 20 62 79 20 63 68 61 | 6e 67 65 64 20 5c 68 79 |e by cha|nged \hy|
|00000170| 70 68 65 6e 63 68 61 72 | 61 63 74 65 72 0d 25 20 |phenchar|acter.% |
|00000180| 69 6e 20 74 68 65 20 31 | 30 20 70 6f 69 6e 74 20 |in the 1|0 point |
|00000190| 74 79 70 65 77 72 69 74 | 65 72 20 66 6f 6e 74 2e |typewrit|er font.|
|000001a0| 20 54 6f 20 77 6f 72 6b | 20 69 6e 20 6f 74 68 65 | To work| in othe|
|000001b0| 72 20 70 6f 69 6e 74 20 | 73 69 7a 65 73 20 69 74 |r point |sizes it|
|000001c0| 20 77 6f 75 6c 64 0d 25 | 20 68 61 76 65 20 74 6f | would.%| have to|
|000001d0| 20 62 65 20 72 65 64 65 | 66 69 6e 65 64 2e 20 49 | be rede|fined. I|
|000001e0| 74 20 6d 61 79 20 62 65 | 20 42 61 74 6f 72 20 74 |t may be| Bator t|
|000001f0| 6f 20 6a 75 73 74 20 6d | 61 6b 65 20 74 68 65 20 |o just m|ake the |
|00000200| 63 68 61 6e 67 65 20 67 | 6c 6f 62 61 6c 6c 79 20 |change g|lobally |
|00000210| 0d 25 20 61 6e 64 20 68 | 61 76 65 20 69 74 20 61 |.% and h|ave it a|
|00000220| 70 70 6c 79 20 74 6f 20 | 61 6e 79 74 68 69 6e 67 |pply to |anything|
|00000230| 20 74 68 61 74 20 69 73 | 20 73 65 74 20 69 6e 20 | that is| set in |
|00000240| 5c 74 74 20 6d 6f 64 65 | 0d 5c 6e 65 77 63 6f 6d |\tt mode|.\newcom|
|00000250| 6d 61 6e 64 7b 5c 64 63 | 6f 64 65 7d 5b 31 5d 7b |mand{\dc|ode}[1]{|
|00000260| 7b 5c 74 74 20 5c 68 79 | 70 68 65 6e 63 68 61 72 |{\tt \hy|phenchar|
|00000270| 5c 74 65 6e 74 74 3d 22 | 32 44 20 23 31 5c 68 79 |\tentt="|2D #1\hy|
|00000280| 70 68 65 6e 63 68 61 72 | 5c 74 65 6e 74 74 3d 2d |phenchar|\tentt=-|
|00000290| 31 7d 7d 0d 0d 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |1}}..\ne|wcommand|
|000002a0| 7b 5c 70 61 72 61 6d 7d | 5b 31 5d 7b 24 5c 6c 61 |{\param}|[1]{$\la|
|000002b0| 6e 67 6c 65 24 7b 5c 65 | 6d 20 23 31 5c 2f 7d 24 |ngle${\e|m #1\/}$|
|000002c0| 5c 72 61 6e 67 6c 65 24 | 7d 0d 5c 6e 65 77 63 6f |\rangle$|}.\newco|
|000002d0| 6d 6d 61 6e 64 7b 5c 70 | 72 6f 74 6f 69 6d 61 67 |mmand{\p|rotoimag|
|000002e0| 65 7d 5b 31 5d 7b 5c 62 | 65 67 69 6e 7b 70 69 63 |e}[1]{\b|egin{pic|
|000002f0| 74 75 72 65 7d 28 31 30 | 30 2c 32 30 29 5c 70 75 |ture}(10|0,20)\pu|
|00000300| 74 28 30 2c 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |t(0,0){\|makebox(|
|00000310| 31 30 30 2c 32 30 29 7b | 5c 74 74 20 23 31 7d 7d |100,20){|\tt #1}}|
|00000320| 5c 70 75 74 28 35 30 2c | 31 30 29 7b 5c 6f 76 61 |\put(50,|10){\ova|
|00000330| 6c 28 31 30 30 2c 32 30 | 29 7d 5c 65 6e 64 7b 70 |l(100,20|)}\end{p|
|00000340| 69 63 74 75 72 65 7d 7d | 0d 5c 6e 65 77 63 6f 6d |icture}}|.\newcom|
|00000350| 6d 61 6e 64 7b 5c 77 70 | 72 6f 74 6f 69 6d 61 67 |mand{\wp|rotoimag|
|00000360| 65 7d 5b 31 5d 7b 5c 62 | 65 67 69 6e 7b 70 69 63 |e}[1]{\b|egin{pic|
|00000370| 74 75 72 65 7d 28 31 32 | 30 2c 32 30 29 5c 70 75 |ture}(12|0,20)\pu|
|00000380| 74 28 30 2c 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |t(0,0){\|makebox(|
|00000390| 31 32 30 2c 32 30 29 7b | 5c 74 74 20 23 31 7d 7d |120,20){|\tt #1}}|
|000003a0| 5c 70 75 74 28 36 30 2c | 31 30 29 7b 5c 6f 76 61 |\put(60,|10){\ova|
|000003b0| 6c 28 31 32 30 2c 32 30 | 29 7d 5c 65 6e 64 7b 70 |l(120,20|)}\end{p|
|000003c0| 69 63 74 75 72 65 7d 7d | 0d 0d 5c 74 69 74 6c 65 |icture}}|..\title|
|000003d0| 7b 47 65 6e 65 72 61 6c | 69 7a 65 64 20 4c 69 6e |{General|ized Lin|
|000003e0| 65 61 72 20 4d 6f 64 65 | 6c 73 20 69 6e 20 4c 69 |ear Mode|ls in Li|
|000003f0| 73 70 2d 53 74 61 74 7d | 0d 5c 61 75 74 68 6f 72 |sp-Stat}|.\author|
|00000400| 7b 4c 75 6b 65 20 54 69 | 65 72 6e 65 79 7d 0d 0d |{Luke Ti|erney}..|
|00000410| 5c 62 65 67 69 6e 7b 64 | 6f 63 75 6d 65 6e 74 7d |\begin{d|ocument}|
|00000420| 0d 5c 6d 61 6b 65 74 69 | 74 6c 65 0d 0d 5c 73 65 |.\maketi|tle..\se|
|00000430| 63 74 69 6f 6e 7b 49 6e | 74 72 6f 64 75 63 74 69 |ction{In|troducti|
|00000440| 6f 6e 7d 0d 54 68 69 73 | 20 6e 6f 74 65 20 6f 75 |on}.This| note ou|
|00000450| 74 6c 69 6e 65 73 20 61 | 20 73 69 6d 70 6c 65 20 |tlines a| simple |
|00000460| 73 79 73 74 65 6d 20 66 | 6f 72 20 66 69 74 74 69 |system f|or fitti|
|00000470| 6e 67 20 67 65 6e 65 72 | 61 6c 69 7a 65 64 20 6c |ng gener|alized l|
|00000480| 69 6e 65 61 72 0d 6d 6f | 64 65 6c 73 20 69 6e 20 |inear.mo|dels in |
|00000490| 4c 69 73 70 2d 53 74 61 | 74 2e 20 54 68 72 65 65 |Lisp-Sta|t. Three|
|000004a0| 20 73 74 61 6e 64 61 72 | 64 20 6d 6f 64 65 6c 73 | standar|d models|
|000004b0| 20 61 72 65 20 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | are imp|lemented|
|000004c0| 3a 0d 5c 62 65 67 69 6e | 7b 69 74 65 6d 69 7a 65 |:.\begin|{itemize|
|000004d0| 7d 0d 5c 69 74 65 6d 20 | 50 6f 69 73 73 6f 6e 20 |}.\item |Poisson |
|000004e0| 72 65 67 72 65 73 73 69 | 6f 6e 20 6d 6f 64 65 6c |regressi|on model|
|000004f0| 73 0d 5c 69 74 65 6d 20 | 42 69 6e 6f 6d 69 61 6c |s.\item |Binomial|
|00000500| 20 72 65 67 72 65 73 73 | 69 6f 6e 20 6d 6f 64 65 | regress|ion mode|
|00000510| 6c 73 0d 5c 69 74 65 6d | 20 47 61 6d 6d 61 20 72 |ls.\item| Gamma r|
|00000520| 65 67 72 65 73 73 69 6f | 6e 20 6d 6f 64 65 6c 73 |egressio|n models|
|00000530| 0d 5c 65 6e 64 7b 69 74 | 65 6d 69 7a 65 7d 0d 54 |.\end{it|emize}.T|
|00000540| 68 65 20 6d 6f 64 65 6c | 20 70 72 6f 74 6f 74 79 |he model| prototy|
|00000550| 70 65 73 20 69 6e 68 65 | 72 69 74 20 66 72 6f 6d |pes inhe|rit from|
|00000560| 20 74 68 65 20 6c 69 6e | 65 61 72 20 72 65 67 72 | the lin|ear regr|
|00000570| 65 73 73 69 6f 6e 20 6d | 6f 64 65 6c 0d 70 72 6f |ession m|odel.pro|
|00000580| 74 6f 74 79 70 65 2e 20 | 42 79 20 64 65 66 61 75 |totype. |By defau|
|00000590| 6c 74 2c 20 65 61 63 68 | 20 6d 6f 64 65 6c 20 75 |lt, each| model u|
|000005a0| 73 65 73 20 74 68 65 20 | 63 61 6e 6f 6e 69 63 61 |ses the |canonica|
|000005b0| 6c 20 6c 69 6e 6b 20 66 | 6f 72 20 69 74 73 0d 65 |l link f|or its.e|
|000005c0| 72 72 6f 72 20 73 74 72 | 75 63 74 75 72 65 2c 20 |rror str|ucture, |
|000005d0| 62 75 74 20 61 6c 74 65 | 72 6e 61 74 65 20 6c 69 |but alte|rnate li|
|000005e0| 6e 6b 20 73 74 72 75 63 | 74 75 72 65 73 20 63 61 |nk struc|tures ca|
|000005f0| 6e 20 62 65 20 73 70 65 | 63 69 66 69 65 64 2e 0d |n be spe|cified..|
|00000600| 0d 54 68 65 20 6e 65 78 | 74 20 73 65 63 74 69 6f |.The nex|t sectio|
|00000610| 6e 20 6f 75 74 6c 69 6e | 65 73 20 74 68 65 20 62 |n outlin|es the b|
|00000620| 61 73 69 63 20 75 73 65 | 20 6f 66 20 74 68 65 20 |asic use| of the |
|00000630| 67 65 6e 65 72 61 6c 69 | 7a 65 64 20 6c 69 6e 65 |generali|zed line|
|00000640| 61 72 0d 6d 6f 64 65 6c | 20 6f 62 6a 65 63 74 73 |ar.model| objects|
|00000650| 2e 20 54 68 65 20 74 68 | 69 72 64 20 73 65 63 74 |. The th|ird sect|
|00000660| 69 6f 6e 20 64 65 73 63 | 72 69 62 65 73 20 61 20 |ion desc|ribes a |
|00000670| 66 65 77 20 66 75 6e 63 | 74 69 6f 6e 73 20 66 6f |few func|tions fo|
|00000680| 72 0d 68 61 6e 64 6c 69 | 6e 67 20 63 61 74 65 67 |r.handli|ng categ|
|00000690| 6f 72 69 63 61 6c 20 69 | 6e 64 65 70 65 6e 64 65 |orical i|ndepende|
|000006a0| 6e 74 20 76 61 72 69 61 | 62 6c 65 73 2e 20 54 68 |nt varia|bles. Th|
|000006b0| 65 20 66 6f 75 72 74 68 | 20 73 65 63 74 69 6f 6e |e fourth| section|
|000006c0| 20 67 69 76 65 73 0d 66 | 75 72 74 68 65 72 20 64 | gives.f|urther d|
|000006d0| 65 74 61 69 6c 73 20 6f | 6e 20 74 68 65 20 73 74 |etails o|n the st|
|000006e0| 72 75 63 74 75 72 65 20 | 6f 66 20 74 68 65 20 6d |ructure |of the m|
|000006f0| 6f 64 65 6c 20 70 72 6f | 74 6f 74 79 70 65 73 2c |odel pro|totypes,|
|00000700| 20 61 6e 64 0d 64 65 73 | 63 72 69 62 65 73 20 68 | and.des|cribes h|
|00000710| 6f 77 20 74 6f 20 64 65 | 66 69 6e 65 20 6e 65 77 |ow to de|fine new|
|00000720| 20 6d 6f 64 65 6c 73 20 | 61 6e 64 20 6c 69 6e 6b | models |and link|
|00000730| 20 73 74 72 75 63 74 75 | 72 65 73 2e 20 54 68 65 | structu|res. The|
|00000740| 20 66 69 6e 61 6c 0d 73 | 65 63 74 69 6f 6e 20 69 | final.s|ection i|
|00000750| 6c 6c 75 73 74 72 61 74 | 65 73 20 73 65 76 65 72 |llustrat|es sever|
|00000760| 61 6c 20 77 61 79 73 20 | 6f 66 20 66 69 74 74 69 |al ways |of fitti|
|00000770| 6e 67 20 6d 6f 72 65 20 | 73 70 65 63 69 61 6c 69 |ng more |speciali|
|00000780| 7a 65 64 20 6d 6f 64 65 | 6c 73 2c 0d 75 73 69 6e |zed mode|ls,.usin|
|00000790| 67 20 74 68 65 20 42 72 | 61 64 6c 65 79 2d 54 65 |g the Br|adley-Te|
|000007a0| 72 72 79 20 6d 6f 64 65 | 6c 20 61 73 20 61 6e 20 |rry mode|l as an |
|000007b0| 65 78 61 6d 70 6c 65 2e | 0d 0d 5c 73 65 63 74 69 |example.|..\secti|
|000007c0| 6f 6e 7b 42 61 73 69 63 | 20 55 73 65 20 6f 66 20 |on{Basic| Use of |
|000007d0| 74 68 65 20 4d 6f 64 65 | 6c 20 4f 62 6a 65 63 74 |the Mode|l Object|
|000007e0| 73 7d 0d 54 68 72 65 65 | 20 66 75 6e 63 74 69 6f |s}.Three| functio|
|000007f0| 6e 73 20 61 72 65 20 61 | 76 61 69 6c 61 62 6c 65 |ns are a|vailable|
|00000800| 20 66 6f 72 20 63 6f 6e | 73 74 72 75 63 74 69 6e | for con|structin|
|00000810| 67 20 67 65 6e 65 72 61 | 6c 69 7a 65 64 20 6c 69 |g genera|lized li|
|00000820| 6e 65 61 72 0d 6d 6f 64 | 65 6c 20 6f 62 6a 65 63 |near.mod|el objec|
|00000830| 74 73 2e 20 20 54 68 65 | 73 65 20 66 75 6e 63 74 |ts. The|se funct|
|00000840| 69 6f 6e 73 20 61 72 65 | 20 63 61 6c 6c 65 64 20 |ions are| called |
|00000850| 61 73 0d 5c 62 65 67 69 | 6e 7b 66 6c 75 73 68 6c |as.\begi|n{flushl|
|00000860| 65 66 74 7d 5c 74 74 0d | 28 70 6f 69 73 73 6f 6e |eft}\tt.|(poisson|
|00000870| 72 65 67 2d 6d 6f 64 65 | 6c 20 5c 70 61 72 61 6d |reg-mode|l \param|
|00000880| 7b 78 7d 20 5c 70 61 72 | 61 6d 7b 79 7d 20 5b 5c |{x} \par|am{y} [\|
|00000890| 70 61 72 61 6d 7b 6b 65 | 79 77 6f 72 64 20 61 72 |param{ke|yword ar|
|000008a0| 67 75 6d 65 6e 74 73 20 | 2e 2e 2e 7d 5d 29 5c 5c |guments |...}])\\|
|000008b0| 0d 28 62 69 6e 6f 6d 69 | 61 6c 72 65 67 2d 6d 6f |.(binomi|alreg-mo|
|000008c0| 64 65 6c 20 5c 70 61 72 | 61 6d 7b 78 7d 20 5c 70 |del \par|am{x} \p|
|000008d0| 61 72 61 6d 7b 79 7d 20 | 5c 70 61 72 61 6d 7b 6e |aram{y} |\param{n|
|000008e0| 7d 20 5b 5c 70 61 72 61 | 6d 7b 6b 65 79 77 6f 72 |} [\para|m{keywor|
|000008f0| 64 20 61 72 67 75 6d 65 | 6e 74 73 20 2e 2e 2e 7d |d argume|nts ...}|
|00000900| 5d 29 5c 5c 0d 28 67 61 | 6d 6d 61 72 65 67 2d 6d |])\\.(ga|mmareg-m|
|00000910| 6f 64 65 6c 20 5c 70 61 | 72 61 6d 7b 78 7d 20 5c |odel \pa|ram{x} \|
|00000920| 70 61 72 61 6d 7b 79 7d | 20 5c 70 61 72 61 6d 7b |param{y}| \param{|
|00000930| 6b 65 79 77 6f 72 64 20 | 61 72 67 75 6d 65 6e 74 |keyword |argument|
|00000940| 73 20 2e 2e 2e 7d 29 0d | 5c 65 6e 64 7b 66 6c 75 |s ...}).|\end{flu|
|00000950| 73 68 6c 65 66 74 7d 0d | 54 68 65 20 5c 70 61 72 |shleft}.|The \par|
|00000960| 61 6d 7b 78 7d 20 61 6e | 64 20 5c 70 61 72 61 6d |am{x} an|d \param|
|00000970| 7b 79 7d 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |{y} argu|ments ar|
|00000980| 65 20 61 73 20 66 6f 72 | 20 74 68 65 0d 5c 64 63 |e as for| the.\dc|
|00000990| 6f 64 65 7b 72 65 67 72 | 65 73 73 69 6f 6e 2d 6d |ode{regr|ession-m|
|000009a0| 6f 64 65 6c 7d 20 66 75 | 6e 63 74 69 6f 6e 2e 20 |odel} fu|nction. |
|000009b0| 54 68 65 20 73 61 6d 70 | 6c 65 20 73 69 7a 65 20 |The samp|le size |
|000009c0| 70 61 72 61 6d 65 74 65 | 72 20 5c 70 61 72 61 6d |paramete|r \param|
|000009d0| 7b 6e 7d 0d 66 6f 72 20 | 62 69 6e 6f 6d 69 61 6c |{n}.for |binomial|
|000009e0| 20 6d 6f 64 65 6c 73 20 | 63 61 6e 20 62 65 20 65 | models |can be e|
|000009f0| 69 74 68 65 72 20 61 6e | 20 69 6e 74 65 67 65 72 |ither an| integer|
|00000a00| 20 6f 72 20 61 20 73 65 | 71 75 65 6e 63 65 20 6f | or a se|quence o|
|00000a10| 66 20 69 6e 74 65 67 65 | 72 73 0d 74 68 65 20 73 |f intege|rs.the s|
|00000a20| 61 6d 65 20 6c 65 6e 67 | 74 68 20 61 73 20 74 68 |ame leng|th as th|
|00000a30| 65 20 72 65 73 70 6f 6e | 73 65 20 76 65 63 74 6f |e respon|se vecto|
|00000a40| 72 2e 20 41 6c 6c 20 6f | 70 74 69 6f 6e 61 6c 20 |r. All o|ptional |
|00000a50| 6b 65 79 77 6f 72 64 0d | 61 72 67 75 6d 65 6e 74 |keyword.|argument|
|00000a60| 73 20 61 63 63 65 70 74 | 65 64 20 62 79 20 74 68 |s accept|ed by th|
|00000a70| 65 20 5c 64 63 6f 64 65 | 7b 72 65 67 72 65 73 73 |e \dcode|{regress|
|00000a80| 69 6f 6e 2d 6d 6f 64 65 | 6c 7d 20 66 75 6e 63 74 |ion-mode|l} funct|
|00000a90| 69 6f 6e 20 61 72 65 0d | 61 63 63 65 70 74 65 64 |ion are.|accepted|
|00000aa0| 20 62 79 20 74 68 65 73 | 65 20 66 75 6e 63 74 69 | by thes|e functi|
|00000ab0| 6f 6e 73 20 61 73 20 77 | 65 6c 6c 2e 20 46 6f 75 |ons as w|ell. Fou|
|00000ac0| 72 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 6b 65 79 |r additi|onal key|
|00000ad0| 77 6f 72 64 73 20 61 72 | 65 0d 61 76 61 69 6c 61 |words ar|e.availa|
|00000ae0| 62 6c 65 3a 0d 5c 64 63 | 6f 64 65 7b 3a 6c 69 6e |ble:.\dc|ode{:lin|
|00000af0| 6b 7d 2c 20 5c 64 63 6f | 64 65 7b 3a 6f 66 66 73 |k}, \dco|de{:offs|
|00000b00| 65 74 7d 2c 20 5c 64 63 | 6f 64 65 7b 3a 76 65 72 |et}, \dc|ode{:ver|
|00000b10| 62 6f 73 65 7d 2c 20 61 | 6e 64 20 5c 64 63 6f 64 |bose}, a|nd \dcod|
|00000b20| 65 7b 3a 70 77 65 69 67 | 68 74 73 7d 2e 0d 54 68 |e{:pweig|hts}..Th|
|00000b30| 65 20 6b 65 79 77 6f 72 | 64 20 5c 64 63 6f 64 65 |e keywor|d \dcode|
|00000b40| 7b 3a 6c 69 6e 6b 7d 20 | 63 61 6e 20 62 65 20 75 |{:link} |can be u|
|00000b50| 73 65 64 20 74 6f 20 73 | 70 65 63 69 66 79 20 61 |sed to s|pecify a|
|00000b60| 6e 20 61 6c 74 65 72 6e | 61 74 65 20 6c 69 6e 6b |n altern|ate link|
|00000b70| 0d 73 74 72 75 63 74 75 | 72 65 2e 20 41 76 61 69 |.structu|re. Avai|
|00000b80| 6c 61 62 6c 65 20 6c 69 | 6e 6b 20 73 74 72 75 63 |lable li|nk struc|
|00000b90| 74 75 72 65 73 20 69 6e | 63 6c 75 64 65 0d 5c 62 |tures in|clude.\b|
|00000ba0| 65 67 69 6e 7b 63 65 6e | 74 65 72 7d 0d 5c 62 65 |egin{cen|ter}.\be|
|00000bb0| 67 69 6e 7b 74 61 62 75 | 6c 61 72 7d 7b 6c 6c 6c |gin{tabu|lar}{lll|
|00000bc0| 6c 7d 0d 5c 74 74 20 69 | 64 65 6e 74 69 74 79 2d |l}.\tt i|dentity-|
|00000bd0| 6c 69 6e 6b 20 26 20 5c | 74 74 20 6c 6f 67 2d 6c |link & \|tt log-l|
|00000be0| 69 6e 6b 20 20 20 20 26 | 20 5c 74 74 20 69 6e 76 |ink &| \tt inv|
|00000bf0| 65 72 73 65 2d 6c 69 6e | 6b 20 26 20 5c 74 74 20 |erse-lin|k & \tt |
|00000c00| 73 71 72 74 2d 6c 69 6e | 6b 5c 5c 0d 5c 74 74 20 |sqrt-lin|k\\.\tt |
|00000c10| 6c 6f 67 69 74 2d 6c 69 | 6e 6b 20 20 20 20 26 20 |logit-li|nk & |
|00000c20| 5c 74 74 20 70 72 6f 62 | 69 74 2d 6c 69 6e 6b 20 |\tt prob|it-link |
|00000c30| 26 20 5c 74 74 20 63 6c | 6f 67 6c 6f 67 2d 6c 69 |& \tt cl|oglog-li|
|00000c40| 6e 6b 0d 5c 65 6e 64 7b | 74 61 62 75 6c 61 72 7d |nk.\end{|tabular}|
|00000c50| 0d 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0d 42 79 |.\end{ce|nter}.By|
|00000c60| 20 64 65 66 61 75 6c 74 | 2c 20 65 61 63 68 20 6d | default|, each m|
|00000c70| 6f 64 65 6c 20 75 73 65 | 73 20 69 74 73 20 63 61 |odel use|s its ca|
|00000c80| 6e 6f 6e 69 63 61 6c 20 | 6c 69 6e 6b 20 73 74 72 |nonical |link str|
|00000c90| 75 63 74 75 72 65 2e 20 | 20 54 68 65 0d 5c 64 63 |ucture. | The.\dc|
|00000ca0| 6f 64 65 7b 3a 6f 66 66 | 73 65 74 7d 20 6b 65 79 |ode{:off|set} key|
|00000cb0| 77 6f 72 64 20 63 61 6e | 20 62 65 20 75 73 65 64 |word can| be used|
|00000cc0| 20 74 6f 20 70 72 6f 76 | 69 64 65 20 61 6e 20 6f | to prov|ide an o|
|00000cd0| 66 66 73 65 74 20 76 61 | 6c 75 65 2c 20 61 6e 64 |ffset va|lue, and|
|00000ce0| 0d 74 68 65 20 6b 65 79 | 77 6f 72 64 20 5c 64 63 |.the key|word \dc|
|00000cf0| 6f 64 65 7b 3a 76 65 72 | 62 6f 73 65 7d 20 63 61 |ode{:ver|bose} ca|
|00000d00| 6e 20 62 65 20 67 69 76 | 65 6e 20 74 68 65 20 76 |n be giv|en the v|
|00000d10| 61 6c 75 65 20 5c 64 63 | 6f 64 65 7b 6e 69 6c 7d |alue \dc|ode{nil}|
|00000d20| 20 74 6f 0d 73 75 70 70 | 72 65 73 73 20 70 72 69 | to.supp|ress pri|
|00000d30| 6e 74 69 6e 67 20 6f 66 | 20 69 74 65 72 61 74 69 |nting of| iterati|
|00000d40| 6f 6e 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 20 |on infor|mation. |
|00000d50| 41 20 70 72 69 6f 72 20 | 77 65 69 67 68 74 20 76 |A prior |weight v|
|00000d60| 65 63 74 6f 72 0d 73 68 | 6f 75 6c 64 20 62 65 20 |ector.sh|ould be |
|00000d70| 73 70 65 63 69 66 69 65 | 64 20 77 69 74 68 20 74 |specifie|d with t|
|00000d80| 68 65 20 5c 64 63 6f 64 | 65 7b 3a 70 77 65 69 67 |he \dcod|e{:pweig|
|00000d90| 68 74 73 7d 20 6b 65 79 | 77 6f 72 64 20 72 61 74 |hts} key|word rat|
|00000da0| 68 65 72 20 74 68 61 6e | 20 74 68 65 0d 5c 64 63 |her than| the.\dc|
|00000db0| 6f 64 65 7b 3a 77 65 69 | 67 68 74 73 7d 20 6b 65 |ode{:wei|ghts} ke|
|00000dc0| 79 77 6f 72 64 2e 0d 0d | 41 73 20 61 6e 20 65 78 |yword...|As an ex|
|00000dd0| 61 6d 70 6c 65 2c 20 77 | 65 20 63 61 6e 20 65 78 |ample, w|e can ex|
|00000de0| 61 6d 69 6e 65 20 61 20 | 64 61 74 61 20 73 65 74 |amine a |data set|
|00000df0| 20 74 68 61 74 20 72 65 | 63 6f 72 64 73 20 74 68 | that re|cords th|
|00000e00| 65 20 6e 75 6d 62 65 72 | 20 6f 66 0d 6d 6f 6e 74 |e number| of.mont|
|00000e10| 68 73 20 70 72 69 6f 72 | 20 74 6f 20 61 6e 20 69 |hs prior| to an i|
|00000e20| 6e 74 65 72 76 69 65 77 | 20 77 68 65 6e 20 69 6e |nterview| when in|
|00000e30| 64 69 76 69 64 75 61 6c | 73 20 72 65 6d 65 6d 62 |dividual|s rememb|
|00000e40| 65 72 20 61 20 73 74 72 | 65 73 73 66 75 6c 0d 65 |er a str|essful.e|
|00000e50| 76 65 6e 74 20 28 6f 72 | 69 67 69 6e 61 6c 6c 79 |vent (or|iginally|
|00000e60| 20 66 72 6f 6d 20 48 61 | 62 65 72 6d 61 6e 2c 20 | from Ha|berman, |
|00000e70| 5c 63 69 74 65 5b 70 2e | 20 32 5d 7b 4a 4b 4c 7d |\cite[p.| 2]{JKL}|
|00000e80| 29 3a 0d 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |):.\begi|n{verbat|
|00000e90| 69 6d 7d 0d 3e 20 28 64 | 65 66 20 6d 6f 6e 74 68 |im}.> (d|ef month|
|00000ea0| 73 2d 62 65 66 6f 72 65 | 20 28 69 73 65 71 20 31 |s-before| (iseq 1|
|00000eb0| 20 31 38 29 29 0d 4d 4f | 4e 54 48 53 2d 42 45 46 | 18)).MO|NTHS-BEF|
|00000ec0| 4f 52 45 0d 3e 20 28 64 | 65 66 20 65 76 65 6e 74 |ORE.> (d|ef event|
|00000ed0| 2d 63 6f 75 6e 74 73 20 | 27 28 31 35 20 31 31 20 |-counts |'(15 11 |
|00000ee0| 31 34 20 31 37 20 35 20 | 31 31 20 31 30 20 34 20 |14 17 5 |11 10 4 |
|00000ef0| 38 20 31 30 20 37 20 39 | 20 31 31 20 33 20 36 20 |8 10 7 9| 11 3 6 |
|00000f00| 31 20 31 20 34 29 29 0d | 45 56 45 4e 54 53 2d 52 |1 1 4)).|EVENTS-R|
|00000f10| 45 43 41 4c 4c 45 44 0d | 5c 65 6e 64 7b 76 65 72 |ECALLED.|\end{ver|
|00000f20| 62 61 74 69 6d 7d 0d 54 | 68 65 20 64 61 74 61 20 |batim}.T|he data |
|00000f30| 61 72 65 20 6d 75 6c 74 | 69 6e 6f 6d 69 61 6c 2c |are mult|inomial,|
|00000f40| 20 61 6e 64 20 77 65 20 | 63 61 6e 20 66 69 74 20 | and we |can fit |
|00000f50| 61 20 6c 6f 67 2d 6c 69 | 6e 65 61 72 20 50 6f 69 |a log-li|near Poi|
|00000f60| 73 73 6f 6e 20 6d 6f 64 | 65 6c 20 74 6f 0d 73 65 |sson mod|el to.se|
|00000f70| 65 20 69 66 20 74 68 65 | 72 65 20 69 73 20 61 6e |e if the|re is an|
|00000f80| 79 20 74 69 6d 65 20 74 | 72 65 6e 64 3a 0d 5c 62 |y time t|rend:.\b|
|00000f90| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 3e |egin{ver|batim}.>|
|00000fa0| 20 28 64 65 66 20 6d 20 | 28 70 6f 69 73 73 6f 6e | (def m |(poisson|
|00000fb0| 72 65 67 2d 6d 6f 64 65 | 6c 20 6d 6f 6e 74 68 73 |reg-mode|l months|
|00000fc0| 2d 62 65 66 6f 72 65 20 | 65 76 65 6e 74 2d 63 6f |-before |event-co|
|00000fd0| 75 6e 74 73 29 29 0d 49 | 74 65 72 61 74 69 6f 6e |unts)).I|teration|
|00000fe0| 20 31 3a 20 64 65 76 69 | 61 6e 63 65 20 3d 20 32 | 1: devi|ance = 2|
|00000ff0| 36 2e 33 31 36 34 0d 49 | 74 65 72 61 74 69 6f 6e |6.3164.I|teration|
|00001000| 20 32 3a 20 64 65 76 69 | 61 6e 63 65 20 3d 20 32 | 2: devi|ance = 2|
|00001010| 34 2e 35 38 30 34 0d 49 | 74 65 72 61 74 69 6f 6e |4.5804.I|teration|
|00001020| 20 33 3a 20 64 65 76 69 | 61 6e 63 65 20 3d 20 32 | 3: devi|ance = 2|
|00001030| 34 2e 35 37 30 34 0d 49 | 74 65 72 61 74 69 6f 6e |4.5704.I|teration|
|00001040| 20 34 3a 20 64 65 76 69 | 61 6e 63 65 20 3d 20 32 | 4: devi|ance = 2|
|00001050| 34 2e 35 37 30 34 0d 0d | 57 65 69 67 68 74 65 64 |4.5704..|Weighted|
|00001060| 20 4c 65 61 73 74 20 53 | 71 75 61 72 65 73 20 45 | Least S|quares E|
|00001070| 73 74 69 6d 61 74 65 73 | 3a 0d 0d 43 6f 6e 73 74 |stimates|:..Const|
|00001080| 61 6e 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ant | |
|00001090| 20 20 20 20 20 32 2e 38 | 30 33 31 36 20 20 20 28 | 2.8|0316 (|
|000010a0| 30 2e 31 34 38 31 36 32 | 29 0d 56 61 72 69 61 62 |0.148162|).Variab|
|000010b0| 6c 65 20 30 20 20 20 20 | 20 20 20 20 20 20 20 20 |le 0 | |
|000010c0| 20 2d 30 2e 30 38 33 37 | 36 39 31 20 20 20 28 30 | -0.0837|691 (0|
|000010d0| 2e 30 31 36 37 39 39 36 | 29 0d 0d 53 63 61 6c 65 |.0167996|)..Scale|
|000010e0| 20 74 61 6b 65 6e 20 61 | 73 3a 20 20 20 20 20 20 | taken a|s: |
|000010f0| 20 20 20 20 20 20 20 20 | 20 20 20 31 0d 44 65 76 | | 1.Dev|
|00001100| 69 61 6e 63 65 3a 20 20 | 20 20 20 20 20 20 20 20 |iance: | |
|00001110| 20 20 20 20 20 20 20 32 | 34 2e 35 37 30 34 0d 4e | 2|4.5704.N|
|00001120| 75 6d 62 65 72 20 6f 66 | 20 63 61 73 65 73 3a 20 |umber of| cases: |
|00001130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 38 | | 18|
|00001140| 0d 44 65 67 72 65 65 73 | 20 6f 66 20 66 72 65 65 |.Degrees| of free|
|00001150| 64 6f 6d 3a 20 20 20 20 | 20 20 20 20 20 20 20 20 |dom: | |
|00001160| 31 36 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |16.\end{|verbatim|
|00001170| 7d 0d 0d 52 65 73 69 64 | 75 61 6c 73 20 66 6f 72 |}..Resid|uals for|
|00001180| 20 74 68 65 20 66 69 74 | 20 63 61 6e 20 62 65 20 | the fit| can be |
|00001190| 6f 62 74 61 69 6e 65 64 | 20 75 73 69 6e 67 20 74 |obtained| using t|
|000011a0| 68 65 20 5c 64 63 6f 64 | 65 7b 3a 72 65 73 69 64 |he \dcod|e{:resid|
|000011b0| 75 61 6c 73 7d 0d 6d 65 | 73 73 61 67 65 3a 0d 5c |uals}.me|ssage:.\|
|000011c0| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0d |begin{ve|rbatim}.|
|000011d0| 3e 20 28 73 65 6e 64 20 | 6d 20 3a 72 65 73 69 64 |> (send |m :resid|
|000011e0| 75 61 6c 73 29 0d 28 2d | 30 2e 30 34 33 39 31 39 |uals).(-|0.043919|
|000011f0| 31 20 2d 30 2e 37 39 30 | 33 30 35 20 2e 2e 2e 29 |1 -0.790|305 ...)|
|00001200| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|00001210| 41 20 72 65 73 69 64 75 | 61 6c 20 70 6c 6f 74 20 |A residu|al plot |
|00001220| 63 61 6e 20 62 65 20 6f | 62 74 61 69 6e 65 64 20 |can be o|btained |
|00001230| 75 73 69 6e 67 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |using.\b|egin{ver|
|00001240| 62 61 74 69 6d 7d 0d 28 | 73 65 6e 64 20 6d 20 3a |batim}.(|send m :|
|00001250| 70 6c 6f 74 2d 72 65 73 | 69 64 75 61 6c 73 29 0d |plot-res|iduals).|
|00001260| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 54 |\end{ver|batim}.T|
|00001270| 68 65 20 5c 64 63 6f 64 | 65 7b 3a 66 69 74 2d 76 |he \dcod|e{:fit-v|
|00001280| 61 6c 75 65 73 7d 20 6d | 65 73 73 61 67 65 20 72 |alues} m|essage r|
|00001290| 65 74 75 72 6e 73 20 24 | 58 5c 62 65 74 61 24 2c |eturns $|X\beta$,|
|000012a0| 20 74 68 65 20 6c 69 6e | 65 61 72 20 70 72 65 64 | the lin|ear pred|
|000012b0| 69 63 74 6f 72 0d 77 69 | 74 68 6f 75 74 20 61 6e |ictor.wi|thout an|
|000012c0| 79 20 6f 66 66 73 65 74 | 2e 20 54 68 65 20 5c 64 |y offset|. The \d|
|000012d0| 63 6f 64 65 7b 3a 66 69 | 74 2d 6d 65 61 6e 73 7d |code{:fi|t-means}|
|000012e0| 20 6d 65 73 73 61 67 65 | 20 72 65 74 75 72 6e 73 | message| returns|
|000012f0| 20 66 69 74 74 65 64 20 | 6d 65 61 6e 0d 72 65 73 | fitted |mean.res|
|00001300| 70 6f 6e 73 65 20 76 61 | 6c 75 65 73 2e 20 54 68 |ponse va|lues. Th|
|00001310| 75 73 20 74 68 65 20 65 | 78 70 72 65 73 73 69 6f |us the e|xpressio|
|00001320| 6e 0d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |n.\begin|{verbati|
|00001330| 6d 7d 0d 28 6c 65 74 20 | 28 28 70 20 28 70 6c 6f |m}.(let |((p (plo|
|00001340| 74 2d 70 6f 69 6e 74 73 | 20 6d 6f 6e 74 68 73 2d |t-points| months-|
|00001350| 62 65 66 6f 72 65 20 65 | 76 65 6e 74 2d 63 6f 75 |before e|vent-cou|
|00001360| 6e 74 73 29 29 29 0d 20 | 20 28 73 65 6e 64 20 70 |nts))). | (send p|
|00001370| 20 3a 61 64 64 2d 6c 69 | 6e 65 73 20 6d 6f 6e 74 | :add-li|nes mont|
|00001380| 68 73 2d 62 65 66 6f 72 | 65 20 28 73 65 6e 64 20 |hs-befor|e (send |
|00001390| 6d 20 3a 66 69 74 2d 6d | 65 61 6e 73 29 29 29 0d |m :fit-m|eans))).|
|000013a0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 63 |\end{ver|batim}.c|
|000013b0| 6f 6e 73 74 72 75 63 74 | 73 20 61 20 70 6c 6f 74 |onstruct|s a plot|
|000013c0| 20 6f 66 20 72 61 77 20 | 63 6f 75 6e 74 73 20 61 | of raw |counts a|
|000013d0| 6e 64 20 66 69 74 74 65 | 64 20 6d 65 61 6e 73 20 |nd fitte|d means |
|000013e0| 61 67 61 69 6e 73 74 20 | 74 69 6d 65 2e 0d 0d 54 |against |time...T|
|000013f0| 6f 20 69 6c 6c 75 73 74 | 72 61 74 65 20 66 69 74 |o illust|rate fit|
|00001400| 74 69 6e 67 20 62 69 6e | 6f 6d 69 61 6c 20 6d 6f |ting bin|omial mo|
|00001410| 64 65 6c 73 2c 20 77 65 | 20 63 61 6e 20 75 73 65 |dels, we| can use|
|00001420| 20 74 68 65 20 6c 65 75 | 6b 65 6d 69 61 20 73 75 | the leu|kemia su|
|00001430| 72 76 69 76 61 6c 0d 64 | 61 74 61 20 6f 66 20 46 |rvival.d|ata of F|
|00001440| 65 69 67 6c 20 61 6e 64 | 20 5a 65 6c 65 6e 20 5c |eigl and| Zelen \|
|00001450| 63 69 74 65 5b 53 65 63 | 74 69 6f 6e 20 32 2e 38 |cite[Sec|tion 2.8|
|00001460| 2e 33 5d 7b 4c 53 7d 20 | 77 69 74 68 20 74 68 65 |.3]{LS} |with the|
|00001470| 20 73 75 72 76 69 76 61 | 6c 0d 74 69 6d 65 20 63 | surviva|l.time c|
|00001480| 6f 6e 76 65 72 74 65 64 | 20 74 6f 20 61 20 6f 6e |onverted| to a on|
|00001490| 65 2d 79 65 61 72 20 73 | 75 72 76 69 76 61 6c 20 |e-year s|urvival |
|000014a0| 69 6e 64 69 63 61 74 6f | 72 3a 0d 5c 62 65 67 69 |indicato|r:.\begi|
|000014b0| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0d 3e 20 28 64 |n{verbat|im}.> (d|
|000014c0| 65 66 20 73 75 72 76 2d | 31 20 28 69 66 2d 65 6c |ef surv-|1 (if-el|
|000014d0| 73 65 20 28 3e 20 74 69 | 6d 65 73 2d 70 6f 73 20 |se (> ti|mes-pos |
|000014e0| 35 32 29 20 31 20 30 29 | 29 0d 53 55 52 56 2d 31 |52) 1 0)|).SURV-1|
|000014f0| 0d 3e 20 73 75 72 76 2d | 31 0d 28 31 20 31 20 31 |.> surv-|1.(1 1 1|
|00001500| 20 31 20 30 20 31 20 31 | 20 30 20 30 20 31 20 31 | 1 0 1 1| 0 0 1 1|
|00001510| 20 30 20 30 20 30 20 30 | 20 30 20 31 29 0d 5c 65 | 0 0 0 0| 0 1).\e|
|00001520| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 54 68 65 |nd{verba|tim}.The|
|00001530| 20 64 65 70 65 6e 64 65 | 6e 74 20 76 61 72 69 61 | depende|nt varia|
|00001540| 62 6c 65 20 69 73 20 74 | 68 65 20 62 61 73 65 20 |ble is t|he base |
|00001550| 31 30 20 6c 6f 67 61 72 | 69 74 68 6d 20 6f 66 20 |10 logar|ithm of |
|00001560| 74 68 65 20 77 68 69 74 | 65 20 62 6c 6f 6f 64 0d |the whit|e blood.|
|00001570| 63 65 6c 6c 20 63 6f 75 | 6e 74 73 20 64 69 76 69 |cell cou|nts divi|
|00001580| 64 65 64 20 62 79 20 31 | 30 2c 30 30 30 3a 0d 5c |ded by 1|0,000:.\|
|00001590| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0d |begin{ve|rbatim}.|
|000015a0| 3e 20 74 72 61 6e 73 66 | 6f 72 6d 65 64 2d 77 62 |> transf|ormed-wb|
|000015b0| 63 2d 70 6f 73 0d 28 2d | 31 2e 34 36 39 36 38 20 |c-pos.(-|1.46968 |
|000015c0| 2d 32 2e 35 39 30 32 37 | 20 2d 30 2e 38 34 33 39 |-2.59027| -0.8439|
|000015d0| 37 20 2d 31 2e 33 34 37 | 30 37 20 2d 30 2e 35 31 |7 -1.347|07 -0.51|
|000015e0| 30 38 32 36 20 30 2e 30 | 34 38 37 39 30 32 20 30 |0826 0.0|487902 0|
|000015f0| 20 30 2e 35 33 30 36 32 | 38 20 2d 30 2e 36 31 36 | 0.53062|8 -0.616|
|00001600| 31 38 36 0d 20 2d 30 2e | 33 35 36 36 37 35 20 2d |186. -0.|356675 -|
|00001610| 30 2e 30 36 31 38 37 35 | 34 20 31 2e 31 36 33 31 |0.061875|4 1.1631|
|00001620| 35 20 31 2e 32 35 32 37 | 36 20 32 2e 33 30 32 35 |5 1.2527|6 2.3025|
|00001630| 39 20 32 2e 33 30 32 35 | 39 20 31 2e 36 34 38 36 |9 2.3025|9 1.6486|
|00001640| 36 20 32 2e 33 30 32 35 | 39 29 0d 5c 65 6e 64 7b |6 2.3025|9).\end{|
|00001650| 76 65 72 62 61 74 69 6d | 7d 0d 41 20 62 69 6e 6f |verbatim|}.A bino|
|00001660| 6d 69 61 6c 20 6d 6f 64 | 65 6c 20 66 6f 72 20 74 |mial mod|el for t|
|00001670| 68 65 73 65 20 64 61 74 | 61 20 63 61 6e 20 62 65 |hese dat|a can be|
|00001680| 20 63 6f 6e 73 74 72 75 | 63 74 65 64 20 62 79 0d | constru|cted by.|
|00001690| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|000016a0| 0d 3e 20 28 64 65 66 20 | 6c 6b 20 28 62 69 6e 6f |.> (def |lk (bino|
|000016b0| 6d 69 61 6c 72 65 67 2d | 6d 6f 64 65 6c 20 74 72 |mialreg-|model tr|
|000016c0| 61 6e 73 66 6f 72 6d 65 | 64 2d 77 62 63 2d 70 6f |ansforme|d-wbc-po|
|000016d0| 73 20 73 75 72 76 2d 31 | 20 31 29 29 0d 49 74 65 |s surv-1| 1)).Ite|
|000016e0| 72 61 74 69 6f 6e 20 31 | 3a 20 64 65 76 69 61 6e |ration 1|: devian|
|000016f0| 63 65 20 3d 20 31 38 2e | 32 39 33 35 0d 49 74 65 |ce = 18.|2935.Ite|
|00001700| 72 61 74 69 6f 6e 20 32 | 3a 20 64 65 76 69 61 6e |ration 2|: devian|
|00001710| 63 65 20 3d 20 31 38 2e | 30 37 38 39 0d 49 74 65 |ce = 18.|0789.Ite|
|00001720| 72 61 74 69 6f 6e 20 33 | 3a 20 64 65 76 69 61 6e |ration 3|: devian|
|00001730| 63 65 20 3d 20 31 38 2e | 30 37 36 31 0d 49 74 65 |ce = 18.|0761.Ite|
|00001740| 72 61 74 69 6f 6e 20 34 | 3a 20 64 65 76 69 61 6e |ration 4|: devian|
|00001750| 63 65 20 3d 20 31 38 2e | 30 37 36 31 0d 0d 57 65 |ce = 18.|0761..We|
|00001760| 69 67 68 74 65 64 20 4c | 65 61 73 74 20 53 71 75 |ighted L|east Squ|
|00001770| 61 72 65 73 20 45 73 74 | 69 6d 61 74 65 73 3a 0d |ares Est|imates:.|
|00001780| 0d 43 6f 6e 73 74 61 6e | 74 20 20 20 20 20 20 20 |.Constan|t |
|00001790| 20 20 20 20 20 20 20 20 | 20 20 30 2e 33 37 32 38 | | 0.3728|
|000017a0| 39 37 20 20 20 28 30 2e | 35 39 30 39 33 34 29 0d |97 (0.|590934).|
|000017b0| 56 61 72 69 61 62 6c 65 | 20 30 20 20 20 20 20 20 |Variable| 0 |
|000017c0| 20 20 20 20 20 20 20 20 | 2d 30 2e 39 38 35 38 30 | |-0.98580|
|000017d0| 33 20 20 20 28 30 2e 35 | 30 38 34 32 36 29 0d 0d |3 (0.5|08426)..|
|000017e0| 53 63 61 6c 65 20 74 61 | 6b 65 6e 20 61 73 3a 20 |Scale ta|ken as: |
|000017f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001800| 31 0d 44 65 76 69 61 6e | 63 65 3a 20 20 20 20 20 |1.Devian|ce: |
|00001810| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 38 2e 30 | | 18.0|
|00001820| 37 36 31 0d 4e 75 6d 62 | 65 72 20 6f 66 20 63 61 |761.Numb|er of ca|
|00001830| 73 65 73 3a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ses: | |
|00001840| 20 20 20 31 37 0d 44 65 | 67 72 65 65 73 20 6f 66 | 17.De|grees of|
|00001850| 20 66 72 65 65 64 6f 6d | 3a 20 20 20 20 20 20 20 | freedom|: |
|00001860| 20 20 20 20 20 31 35 0d | 5c 65 6e 64 7b 76 65 72 | 15.|\end{ver|
|00001870| 62 61 74 69 6d 7d 0d 54 | 68 69 73 20 6d 6f 64 65 |batim}.T|his mode|
|00001880| 6c 20 75 73 65 73 20 74 | 68 65 20 6c 6f 67 69 74 |l uses t|he logit|
|00001890| 20 6c 69 6e 6b 2c 20 74 | 68 65 20 63 61 6e 6f 6e | link, t|he canon|
|000018a0| 69 63 61 6c 20 6c 69 6e | 6b 20 66 6f 72 20 74 68 |ical lin|k for th|
|000018b0| 65 20 62 69 6e 6f 6d 69 | 61 6c 0d 64 69 73 74 72 |e binomi|al.distr|
|000018c0| 69 62 75 74 69 6f 6e 2e | 20 41 73 20 61 6e 20 61 |ibution.| As an a|
|000018d0| 6c 74 65 72 6e 61 74 69 | 76 65 2c 20 74 68 65 20 |lternati|ve, the |
|000018e0| 65 78 70 72 65 73 73 69 | 6f 6e 0d 5c 62 65 67 69 |expressi|on.\begi|
|000018f0| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0d 28 62 69 6e |n{verbat|im}.(bin|
|00001900| 6f 6d 69 61 6c 72 65 67 | 2d 6d 6f 64 65 6c 20 74 |omialreg|-model t|
|00001910| 72 61 6e 73 66 6f 72 6d | 65 64 2d 77 62 63 2d 70 |ransform|ed-wbc-p|
|00001920| 6f 73 20 73 75 72 76 2d | 31 20 31 20 3a 6c 69 6e |os surv-|1 1 :lin|
|00001930| 6b 20 70 72 6f 62 69 74 | 2d 6c 69 6e 6b 29 0d 5c |k probit|-link).\|
|00001940| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 72 65 |end{verb|atim}.re|
|00001950| 74 75 72 6e 73 20 61 20 | 6d 6f 64 65 6c 20 75 73 |turns a |model us|
|00001960| 69 6e 67 20 61 20 70 72 | 6f 62 69 74 20 6c 69 6e |ing a pr|obit lin|
|00001970| 6b 2e 0d 0d 54 68 65 20 | 5c 64 63 6f 64 65 7b 3a |k...The |\dcode{:|
|00001980| 63 6f 6f 6b 73 2d 64 69 | 73 74 61 6e 63 65 73 7d |cooks-di|stances}|
|00001990| 20 6d 65 73 73 61 67 65 | 20 68 65 6c 70 73 20 74 | message| helps t|
|000019a0| 6f 20 68 69 67 68 6c 69 | 67 68 74 20 74 68 65 20 |o highli|ght the |
|000019b0| 6c 61 73 74 0d 6f 62 73 | 65 72 76 61 74 69 6f 6e |last.obs|ervation|
|000019c0| 20 66 6f 72 20 70 6f 73 | 73 69 62 6c 65 20 66 75 | for pos|sible fu|
|000019d0| 72 74 68 65 72 20 65 78 | 61 6d 69 6e 61 74 69 6f |rther ex|aminatio|
|000019e0| 6e 3a 0d 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |n:.\begi|n{verbat|
|000019f0| 69 6d 7d 0d 3e 20 28 73 | 65 6e 64 20 6c 6b 20 3a |im}.> (s|end lk :|
|00001a00| 63 6f 6f 6b 73 2d 64 69 | 73 74 61 6e 63 65 73 29 |cooks-di|stances)|
|00001a10| 0d 28 30 2e 30 31 34 32 | 30 34 36 20 30 2e 30 30 |.(0.0142|046 0.00|
|00001a20| 34 30 33 32 34 33 20 30 | 2e 30 32 31 39 30 37 20 |403243 0|.021907 |
|00001a30| 30 2e 30 31 35 37 31 35 | 33 20 30 2e 31 34 39 33 |0.015715|3 0.1493|
|00001a40| 39 34 20 30 2e 30 33 35 | 39 37 32 33 20 30 2e 30 |94 0.035|9723 0.0|
|00001a50| 33 34 36 33 38 33 0d 20 | 30 2e 30 34 35 30 39 39 |346383. |0.045099|
|00001a60| 34 20 30 2e 31 37 34 37 | 39 39 20 30 2e 30 32 37 |4 0.1747|99 0.027|
|00001a70| 39 31 31 34 20 30 2e 30 | 33 33 31 33 33 33 20 30 |9114 0.0|331333 0|
|00001a80| 2e 30 33 34 37 38 38 33 | 20 30 2e 30 33 33 36 36 |.0347883| 0.03366|
|00001a90| 34 20 30 2e 30 31 37 30 | 34 34 31 20 0d 20 30 2e |4 0.0170|441 . 0.|
|00001aa0| 30 31 37 30 34 34 31 20 | 30 2e 30 32 38 30 34 31 |0170441 |0.028041|
|00001ab0| 31 20 30 2e 37 35 37 33 | 33 32 29 0d 5c 65 6e 64 |1 0.7573|32).\end|
|00001ac0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 54 68 69 73 20 |{verbati|m}.This |
|00001ad0| 6f 62 73 65 72 76 61 74 | 69 6f 6e 20 61 6c 73 6f |observat|ion also|
|00001ae0| 20 73 74 61 6e 64 73 20 | 6f 75 74 20 69 6e 20 74 | stands |out in t|
|00001af0| 68 65 20 70 6c 6f 74 20 | 70 72 6f 64 75 63 65 64 |he plot |produced|
|00001b00| 20 62 79 0d 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 | by.\beg|in{verba|
|00001b10| 74 69 6d 7d 0d 28 73 65 | 6e 64 20 6c 6b 20 3a 70 |tim}.(se|nd lk :p|
|00001b20| 6c 6f 74 2d 62 61 79 65 | 73 2d 72 65 73 69 64 75 |lot-baye|s-residu|
|00001b30| 61 6c 73 29 0d 5c 65 6e | 64 7b 76 65 72 62 61 74 |als).\en|d{verbat|
|00001b40| 69 6d 7d 0d 0d 5c 73 65 | 63 74 69 6f 6e 7b 54 6f |im}..\se|ction{To|
|00001b50| 6f 6c 73 20 66 6f 72 20 | 43 61 74 65 67 6f 72 69 |ols for |Categori|
|00001b60| 63 61 6c 20 56 61 72 69 | 61 62 6c 65 73 7d 0d 46 |cal Vari|ables}.F|
|00001b70| 6f 75 72 20 66 75 6e 63 | 74 69 6f 6e 73 20 61 72 |our func|tions ar|
|00001b80| 65 20 70 72 6f 76 69 64 | 65 64 20 74 6f 20 68 65 |e provid|ed to he|
|00001b90| 6c 70 20 63 6f 6e 73 74 | 72 75 63 74 20 69 6e 64 |lp const|ruct ind|
|00001ba0| 69 63 61 74 6f 72 20 76 | 65 63 74 6f 72 73 20 66 |icator v|ectors f|
|00001bb0| 6f 72 0d 63 61 74 65 67 | 6f 72 69 63 61 6c 20 76 |or.categ|orical v|
|00001bc0| 61 72 69 61 62 6c 65 73 | 2e 20 41 73 20 61 6e 20 |ariables|. As an |
|00001bd0| 69 6c 6c 75 73 74 72 61 | 74 69 6f 6e 2c 20 61 20 |illustra|tion, a |
|00001be0| 64 61 74 61 20 73 65 74 | 20 75 73 65 64 20 62 79 |data set| used by|
|00001bf0| 20 42 69 73 68 6f 70 2c | 0d 46 69 65 6e 62 65 72 | Bishop,|.Fienber|
|00001c00| 67 2c 20 61 6e 64 20 48 | 6f 6c 6c 61 6e 64 20 65 |g, and H|olland e|
|00001c10| 78 61 6d 69 6e 65 73 20 | 74 68 65 20 72 65 6c 61 |xamines |the rela|
|00001c20| 74 69 6f 6e 73 68 69 70 | 20 62 65 74 77 65 65 6e |tionship| between|
|00001c30| 20 6f 63 63 75 70 61 74 | 69 6f 6e 61 6c 0d 63 6c | occupat|ional.cl|
|00001c40| 61 73 73 69 66 69 63 61 | 74 69 6f 6e 73 20 6f 66 |assifica|tions of|
|00001c50| 20 66 61 74 68 65 72 73 | 20 61 6e 64 20 73 6f 6e | fathers| and son|
|00001c60| 73 2e 20 54 68 65 20 63 | 6c 61 73 73 65 73 20 61 |s. The c|lasses a|
|00001c70| 72 65 0d 5c 62 65 67 69 | 6e 7b 63 65 6e 74 65 72 |re.\begi|n{center|
|00001c80| 7d 0d 5c 62 65 67 69 6e | 7b 74 61 62 75 6c 61 72 |}.\begin|{tabular|
|00001c90| 7d 7b 7c 63 7c 6c 7c 7d | 0d 5c 68 6c 69 6e 65 0d |}{|c|l|}|.\hline.|
|00001ca0| 4c 61 62 65 6c 20 26 20 | 44 65 73 63 72 69 70 74 |Label & |Descript|
|00001cb0| 69 6f 6e 5c 5c 0d 5c 68 | 6c 69 6e 65 0d 41 20 20 |ion\\.\h|line.A |
|00001cc0| 20 20 20 26 20 50 72 6f | 66 65 73 73 69 6f 6e 61 | & Pro|fessiona|
|00001cd0| 6c 2c 20 48 69 67 68 20 | 41 64 6d 69 6e 69 73 74 |l, High |Administ|
|00001ce0| 72 61 74 69 76 65 5c 5c | 0d 53 20 20 20 20 20 26 |rative\\|.S &|
|00001cf0| 20 4d 61 6e 61 67 65 72 | 69 61 6c 2c 20 45 78 65 | Manager|ial, Exe|
|00001d00| 63 75 74 69 76 65 2c 20 | 48 69 67 68 20 53 75 70 |cutive, |High Sup|
|00001d10| 65 72 76 69 73 6f 72 79 | 5c 5c 0d 49 20 20 20 20 |ervisory|\\.I |
|00001d20| 20 26 20 4c 6f 77 20 49 | 6e 73 70 65 63 74 69 6f | & Low I|nspectio|
|00001d30| 6e 61 6c 2c 20 53 75 70 | 65 72 76 69 73 6f 72 79 |nal, Sup|ervisory|
|00001d40| 5c 5c 0d 4e 20 20 20 20 | 20 26 20 52 6f 75 74 69 |\\.N | & Routi|
|00001d50| 6e 65 20 4e 6f 6e 6d 61 | 6e 75 61 6c 2c 20 53 6b |ne Nonma|nual, Sk|
|00001d60| 69 6c 6c 65 64 20 4d 61 | 6e 75 61 6c 5c 5c 0d 55 |illed Ma|nual\\.U|
|00001d70| 20 20 20 20 20 26 20 53 | 65 6d 69 2d 20 61 6e 64 | & S|emi- and|
|00001d80| 20 55 6e 73 6b 69 6c 6c | 65 64 20 4d 61 6e 75 61 | Unskill|ed Manua|
|00001d90| 6c 5c 5c 0d 5c 68 6c 69 | 6e 65 0d 5c 65 6e 64 7b |l\\.\hli|ne.\end{|
|00001da0| 74 61 62 75 6c 61 72 7d | 0d 5c 65 6e 64 7b 63 65 |tabular}|.\end{ce|
|00001db0| 6e 74 65 72 7d 0d 54 68 | 65 20 63 6f 75 6e 74 73 |nter}.Th|e counts|
|00001dc0| 20 61 72 65 20 67 69 76 | 65 6e 20 62 79 0d 5c 62 | are giv|en by.\b|
|00001dd0| 65 67 69 6e 7b 63 65 6e | 74 65 72 7d 0d 5c 62 65 |egin{cen|ter}.\be|
|00001de0| 67 69 6e 7b 74 61 62 75 | 6c 61 72 7d 7b 7c 63 7c |gin{tabu|lar}{|c||
|00001df0| 72 72 72 72 72 7c 7d 0d | 5c 68 6c 69 6e 65 0d 20 |rrrrr|}.|\hline. |
|00001e00| 20 20 20 20 20 20 26 20 | 5c 6d 75 6c 74 69 63 6f | & |\multico|
|00001e10| 6c 75 6d 6e 7b 35 7d 7b | 63 7c 7d 7b 53 6f 6e 7d |lumn{5}{|c|}{Son}|
|00001e20| 5c 5c 0d 5c 68 6c 69 6e | 65 0d 46 61 74 68 65 72 |\\.\hlin|e.Father|
|00001e30| 20 26 20 20 41 20 26 20 | 20 20 53 20 26 20 20 20 | & A & | S & |
|00001e40| 49 20 26 20 20 20 4e 20 | 26 20 20 20 55 20 5c 5c |I & N |& U \\|
|00001e50| 0d 5c 68 6c 69 6e 65 0d | 20 41 20 20 20 20 20 26 |.\hline.| A &|
|00001e60| 20 35 30 20 26 20 20 34 | 35 20 26 20 20 20 38 20 | 50 & 4|5 & 8 |
|00001e70| 26 20 20 31 38 20 26 20 | 20 20 38 20 5c 5c 0d 20 |& 18 & | 8 \\. |
|00001e80| 53 20 20 20 20 20 26 20 | 32 38 20 26 20 31 37 34 |S & |28 & 174|
|00001e90| 20 26 20 20 38 34 20 26 | 20 31 35 34 20 26 20 20 | & 84 &| 154 & |
|00001ea0| 35 35 20 5c 5c 0d 20 49 | 20 20 20 20 20 26 20 31 |55 \\. I| & 1|
|00001eb0| 31 20 26 20 20 37 38 20 | 26 20 31 31 30 20 26 20 |1 & 78 |& 110 & |
|00001ec0| 32 32 33 20 26 20 20 39 | 36 20 5c 5c 0d 20 4e 20 |223 & 9|6 \\. N |
|00001ed0| 20 20 20 20 26 20 31 34 | 20 26 20 31 35 30 20 26 | & 14| & 150 &|
|00001ee0| 20 31 38 35 20 26 20 37 | 31 34 20 26 20 34 34 37 | 185 & 7|14 & 447|
|00001ef0| 20 5c 5c 0d 20 55 20 20 | 20 20 20 26 20 20 33 20 | \\. U | & 3 |
|00001f00| 26 20 20 34 32 20 26 20 | 20 37 32 20 26 20 33 32 |& 42 & | 72 & 32|
|00001f10| 30 20 26 20 34 31 31 20 | 5c 5c 0d 5c 68 6c 69 6e |0 & 411 |\\.\hlin|
|00001f20| 65 0d 5c 65 6e 64 7b 74 | 61 62 75 6c 61 72 7d 0d |e.\end{t|abular}.|
|00001f30| 5c 65 6e 64 7b 63 65 6e | 74 65 72 7d 0d 0d 57 65 |\end{cen|ter}..We|
|00001f40| 20 63 61 6e 20 73 65 74 | 20 75 70 20 74 68 65 20 | can set| up the |
|00001f50| 6f 63 63 75 70 61 74 69 | 6f 6e 20 63 6f 64 65 73 |occupati|on codes|
|00001f60| 20 61 73 0d 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 | as.\beg|in{verba|
|00001f70| 74 69 6d 7d 0d 28 64 65 | 66 20 6f 63 63 75 70 61 |tim}.(de|f occupa|
|00001f80| 74 69 6f 6e 20 27 28 61 | 20 73 20 69 20 6e 20 75 |tion '(a| s i n u|
|00001f90| 29 29 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |)).\end{|verbatim|
|00001fa0| 7d 0d 61 6e 64 20 63 6f | 6e 73 74 72 75 63 74 20 |}.and co|nstruct |
|00001fb0| 74 68 65 20 73 6f 6e 27 | 73 20 61 6e 64 20 66 61 |the son'|s and fa|
|00001fc0| 74 68 65 72 27 73 20 63 | 6f 64 65 20 76 65 63 74 |ther's c|ode vect|
|00001fd0| 6f 72 73 20 66 6f 72 20 | 65 6e 74 65 72 69 6e 67 |ors for |entering|
|00001fe0| 20 74 68 65 0d 64 61 74 | 61 20 72 6f 77 20 62 79 | the.dat|a row by|
|00001ff0| 20 72 6f 77 20 61 73 0d | 5c 62 65 67 69 6e 7b 76 | row as.|\begin{v|
|00002000| 65 72 62 61 74 69 6d 7d | 0d 28 64 65 66 20 73 6f |erbatim}|.(def so|
|00002010| 6e 20 28 72 65 70 65 61 | 74 20 6f 63 63 75 70 61 |n (repea|t occupa|
|00002020| 74 69 6f 6e 20 35 29 29 | 0d 28 64 65 66 20 66 61 |tion 5))|.(def fa|
|00002030| 74 68 65 72 20 28 72 65 | 70 65 61 74 20 6f 63 63 |ther (re|peat occ|
|00002040| 75 70 61 74 69 6f 6e 20 | 28 72 65 70 65 61 74 20 |upation |(repeat |
|00002050| 35 20 35 29 29 29 0d 5c | 65 6e 64 7b 76 65 72 62 |5 5))).\|end{verb|
|00002060| 61 74 69 6d 7d 0d 54 68 | 65 20 63 6f 75 6e 74 73 |atim}.Th|e counts|
|00002070| 20 63 61 6e 20 74 68 65 | 6e 20 62 65 20 65 6e 74 | can the|n be ent|
|00002080| 65 72 65 64 20 61 73 0d | 5c 62 65 67 69 6e 7b 76 |ered as.|\begin{v|
|00002090| 65 72 62 61 74 69 6d 7d | 0d 28 64 65 66 20 63 6f |erbatim}|.(def co|
|000020a0| 75 6e 74 73 20 27 28 35 | 30 20 20 34 35 20 20 20 |unts '(5|0 45 |
|000020b0| 38 20 20 31 38 20 20 20 | 38 20 0d 20 20 20 20 20 |8 18 |8 . |
|000020c0| 20 20 20 20 20 20 20 20 | 20 32 38 20 31 37 34 20 | | 28 174 |
|000020d0| 20 38 34 20 31 35 34 20 | 20 35 35 20 0d 20 20 20 | 84 154 | 55 . |
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 31 31 20 20 37 | | 11 7|
|000020f0| 38 20 31 31 30 20 32 32 | 33 20 20 39 36 0d 20 20 |8 110 22|3 96. |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 34 20 31 | | 14 1|
|00002110| 35 30 20 31 38 35 20 37 | 31 34 20 34 34 37 0d 20 |50 185 7|14 447. |
|00002120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 33 20 | | 3 |
|00002130| 20 34 32 20 20 37 32 20 | 33 32 30 20 34 31 31 29 | 42 72 |320 411)|
|00002140| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|00002150| 0d 0d 54 6f 20 66 69 74 | 20 61 6e 20 61 64 64 69 |..To fit| an addi|
|00002160| 74 69 76 65 20 6c 6f 67 | 2d 6c 69 6e 65 61 72 20 |tive log|-linear |
|00002170| 6d 6f 64 65 6c 2c 20 77 | 65 20 6e 65 65 64 20 74 |model, w|e need t|
|00002180| 6f 20 63 6f 6e 73 74 72 | 75 63 74 20 6c 65 76 65 |o constr|uct leve|
|00002190| 6c 0d 69 6e 64 69 63 61 | 74 6f 72 73 2e 20 20 54 |l.indica|tors. T|
|000021a0| 68 69 73 20 63 61 6e 20 | 62 65 20 64 6f 6e 65 20 |his can |be done |
|000021b0| 75 73 69 6e 67 20 74 68 | 65 20 66 75 6e 63 74 69 |using th|e functi|
|000021c0| 6f 6e 20 5c 64 63 6f 64 | 65 7b 69 6e 64 69 63 61 |on \dcod|e{indica|
|000021d0| 74 6f 72 73 7d 3a 0d 5c | 62 65 67 69 6e 7b 76 65 |tors}:.\|begin{ve|
|000021e0| 72 62 61 74 69 6d 7d 0d | 3e 20 28 69 6e 64 69 63 |rbatim}.|> (indic|
|000021f0| 61 74 6f 72 73 20 73 6f | 6e 29 0d 28 28 30 20 31 |ators so|n).((0 1|
|00002200| 20 30 20 30 20 30 20 30 | 20 31 20 30 20 30 20 30 | 0 0 0 0| 1 0 0 0|
|00002210| 20 30 20 31 20 30 20 30 | 20 30 20 30 20 31 20 30 | 0 1 0 0| 0 0 1 0|
|00002220| 20 30 20 30 20 30 20 31 | 20 30 20 30 20 30 29 0d | 0 0 0 1| 0 0 0).|
|00002230| 20 28 30 20 30 20 31 20 | 30 20 30 20 30 20 30 20 | (0 0 1 |0 0 0 0 |
|00002240| 31 20 30 20 30 20 30 20 | 30 20 31 20 30 20 30 20 |1 0 0 0 |0 1 0 0 |
|00002250| 30 20 30 20 31 20 30 20 | 30 20 30 20 30 20 31 20 |0 0 1 0 |0 0 0 1 |
|00002260| 30 20 30 29 0d 20 28 30 | 20 30 20 30 20 31 20 30 |0 0). (0| 0 0 1 0|
|00002270| 20 30 20 30 20 30 20 31 | 20 30 20 30 20 30 20 30 | 0 0 0 1| 0 0 0 0|
|00002280| 20 31 20 30 20 30 20 30 | 20 30 20 31 20 30 20 30 | 1 0 0 0| 0 1 0 0|
|00002290| 20 30 20 30 20 31 20 30 | 29 0d 20 28 30 20 30 20 | 0 0 1 0|). (0 0 |
|000022a0| 30 20 30 20 31 20 30 20 | 30 20 30 20 30 20 31 20 |0 0 1 0 |0 0 0 1 |
|000022b0| 30 20 30 20 30 20 30 20 | 31 20 30 20 30 20 30 20 |0 0 0 0 |1 0 0 0 |
|000022c0| 30 20 31 20 30 20 30 20 | 30 20 30 20 31 29 29 0d |0 1 0 0 |0 0 1)).|
|000022d0| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0d 54 |\end{ver|batim}.T|
|000022e0| 68 65 20 72 65 73 75 6c | 74 20 69 73 20 61 20 6c |he resul|t is a l|
|000022f0| 69 73 74 20 6f 66 20 69 | 6e 64 69 63 61 74 6f 72 |ist of i|ndicator|
|00002300| 20 76 61 72 69 61 62 6c | 65 73 20 66 6f 72 20 74 | variabl|es for t|
|00002310| 68 65 20 73 65 63 6f 6e | 64 20 74 68 72 6f 75 67 |he secon|d throug|
|00002320| 68 20 74 68 65 20 66 69 | 66 74 68 0d 6c 65 76 65 |h the fi|fth.leve|
|00002330| 6c 73 20 6f 66 20 74 68 | 65 20 76 61 72 69 61 62 |ls of th|e variab|
|00002340| 6c 65 20 5c 64 63 6f 64 | 65 7b 73 6f 6e 7d 2e 20 |le \dcod|e{son}. |
|00002350| 42 79 20 64 65 66 61 75 | 6c 74 2c 20 74 68 65 20 |By defau|lt, the |
|00002360| 66 69 72 73 74 20 6c 65 | 76 65 6c 20 69 73 20 64 |first le|vel is d|
|00002370| 72 6f 70 70 65 64 2e 0d | 54 6f 20 6f 62 74 61 69 |ropped..|To obtai|
|00002380| 6e 20 69 6e 64 69 63 61 | 74 6f 72 73 20 66 6f 72 |n indica|tors for|
|00002390| 20 61 6c 6c 20 66 69 76 | 65 20 6c 65 76 65 6c 73 | all fiv|e levels|
|000023a0| 2c 20 77 65 20 63 61 6e | 20 73 75 70 70 6c 79 20 |, we can| supply |
|000023b0| 74 68 65 20 5c 64 63 6f | 64 65 7b 3a 64 72 6f 70 |the \dco|de{:drop|
|000023c0| 2d 66 69 72 73 74 7d 0d | 6b 65 79 77 6f 72 64 20 |-first}.|keyword |
|000023d0| 77 69 74 68 20 76 61 6c | 75 65 20 5c 64 63 6f 64 |with val|ue \dcod|
|000023e0| 65 7b 6e 69 6c 7d 3a 0d | 5c 62 65 67 69 6e 7b 76 |e{nil}:.|\begin{v|
|000023f0| 65 72 62 61 74 69 6d 7d | 0d 3e 20 28 69 6e 64 69 |erbatim}|.> (indi|
|00002400| 63 61 74 6f 72 73 20 73 | 6f 6e 20 3a 64 72 6f 70 |cators s|on :drop|
|00002410| 2d 66 69 72 73 74 20 6e | 69 6c 29 0d 28 28 31 20 |-first n|il).((1 |
|00002420| 30 20 30 20 30 20 30 20 | 31 20 30 20 30 20 30 20 |0 0 0 0 |1 0 0 0 |
|00002430| 30 20 31 20 30 20 30 20 | 30 20 30 20 31 20 30 20 |0 1 0 0 |0 0 1 0 |
|00002440| 30 20 30 20 30 20 31 20 | 30 20 30 20 30 20 30 29 |0 0 0 1 |0 0 0 0)|
|00002450| 0d 20 28 30 20 31 20 30 | 20 30 20 30 20 30 20 31 |. (0 1 0| 0 0 0 1|
|00002460| 20 30 20 30 20 30 20 30 | 20 31 20 30 20 30 20 30 | 0 0 0 0| 1 0 0 0|
|00002470| 20 30 20 31 20 30 20 30 | 20 30 20 30 20 31 20 30 | 0 1 0 0| 0 0 1 0|
|00002480| 20 30 20 30 29 0d 20 28 | 30 20 30 20 31 20 30 20 | 0 0). (|0 0 1 0 |
|00002490| 30 20 30 20 30 20 31 20 | 30 20 30 20 30 20 30 20 |0 0 0 1 |0 0 0 0 |
|000024a0| 31 20 30 20 30 20 30 20 | 30 20 31 20 30 20 30 20 |1 0 0 0 |0 1 0 0 |
|000024b0| 30 20 30 20 31 20 30 20 | 30 29 0d 20 28 30 20 30 |0 0 1 0 |0). (0 0|
|000024c0| 20 30 20 31 20 30 20 30 | 20 30 20 30 20 31 20 30 | 0 1 0 0| 0 0 1 0|
|000024d0| 20 30 20 30 20 30 20 31 | 20 30 20 30 20 30 20 30 | 0 0 0 1| 0 0 0 0|
|000024e0| 20 31 20 30 20 30 20 30 | 20 30 20 31 20 30 29 0d | 1 0 0 0| 0 1 0).|
|000024f0| 20 28 30 20 30 20 30 20 | 30 20 31 20 30 20 30 20 | (0 0 0 |0 1 0 0 |
|00002500| 30 20 30 20 31 20 30 20 | 30 20 30 20 30 20 31 20 |0 0 1 0 |0 0 0 1 |
|00002510| 30 20 30 20 30 20 30 20 | 31 20 30 20 30 20 30 20 |0 0 0 0 |1 0 0 0 |
|00002520| 30 20 31 29 29 0d 5c 65 | 6e 64 7b 76 65 72 62 61 |0 1)).\e|nd{verba|
|00002530| 74 69 6d 7d 0d 0d 54 6f | 20 70 72 6f 64 75 63 65 |tim}..To| produce|
|00002540| 20 61 20 72 65 61 64 61 | 62 6c 65 20 73 75 6d 6d | a reada|ble summ|
|00002550| 61 72 79 20 6f 66 20 74 | 68 65 20 66 69 74 2c 20 |ary of t|he fit, |
|00002560| 77 65 20 61 6c 73 6f 20 | 6e 65 65 64 20 73 6f 6d |we also |need som|
|00002570| 65 20 6c 61 62 65 6c 73 | 3a 0d 5c 62 65 67 69 6e |e labels|:.\begin|
|00002580| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 3e 20 28 6c 65 |{verbati|m}.> (le|
|00002590| 76 65 6c 2d 6e 61 6d 65 | 73 20 73 6f 6e 20 3a 70 |vel-name|s son :p|
|000025a0| 72 65 66 69 78 20 27 73 | 6f 6e 29 0d 28 22 53 4f |refix 's|on).("SO|
|000025b0| 4e 28 53 29 22 20 22 53 | 4f 4e 28 49 29 22 20 22 |N(S)" "S|ON(I)" "|
|000025c0| 53 4f 4e 28 4e 29 22 20 | 22 53 4f 4e 28 55 29 22 |SON(N)" |"SON(U)"|
|000025d0| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|000025e0| 0d 42 79 20 64 65 66 61 | 75 6c 74 2c 20 74 68 69 |.By defa|ult, thi|
|000025f0| 73 20 66 75 6e 63 74 69 | 6f 6e 20 61 6c 73 6f 20 |s functi|on also |
|00002600| 64 72 6f 70 73 20 74 68 | 65 20 66 69 72 73 74 20 |drops th|e first |
|00002610| 6c 65 76 65 6c 2e 20 54 | 68 69 73 20 63 61 6e 20 |level. T|his can |
|00002620| 61 67 61 69 6e 20 62 65 | 0d 63 68 61 6e 67 65 64 |again be|.changed|
|00002630| 20 62 79 20 73 75 70 70 | 6c 79 69 6e 67 20 74 68 | by supp|lying th|
|00002640| 65 20 5c 64 63 6f 64 65 | 7b 3a 64 72 6f 70 2d 66 |e \dcode|{:drop-f|
|00002650| 69 72 73 74 7d 20 6b 65 | 79 77 6f 72 64 20 61 72 |irst} ke|yword ar|
|00002660| 67 75 6d 65 6e 74 20 61 | 73 0d 5c 64 63 6f 64 65 |gument a|s.\dcode|
|00002670| 7b 6e 69 6c 7d 3a 0d 5c | 62 65 67 69 6e 7b 76 65 |{nil}:.\|begin{ve|
|00002680| 72 62 61 74 69 6d 7d 0d | 3e 20 28 6c 65 76 65 6c |rbatim}.|> (level|
|00002690| 2d 6e 61 6d 65 73 20 73 | 6f 6e 20 3a 70 72 65 66 |-names s|on :pref|
|000026a0| 69 78 20 27 73 6f 6e 20 | 3a 64 72 6f 70 2d 66 69 |ix 'son |:drop-fi|
|000026b0| 72 73 74 20 6e 69 6c 29 | 0d 28 22 53 4f 4e 28 41 |rst nil)|.("SON(A|
|000026c0| 29 22 20 22 53 4f 4e 28 | 53 29 22 20 22 53 4f 4e |)" "SON(|S)" "SON|
|000026d0| 28 49 29 22 20 22 53 4f | 4e 28 4e 29 22 20 22 53 |(I)" "SO|N(N)" "S|
|000026e0| 4f 4e 28 55 29 22 29 0d | 5c 65 6e 64 7b 76 65 72 |ON(U)").|\end{ver|
|000026f0| 62 61 74 69 6d 7d 0d 54 | 68 65 20 76 61 6c 75 65 |batim}.T|he value|
|00002700| 20 6f 66 20 74 68 65 20 | 5c 64 63 6f 64 65 7b 3a | of the |\dcode{:|
|00002710| 70 72 65 66 69 78 7d 20 | 6b 65 79 77 6f 72 64 20 |prefix} |keyword |
|00002720| 63 61 6e 20 62 65 20 61 | 6e 79 20 4c 69 73 70 20 |can be a|ny Lisp |
|00002730| 65 78 70 72 65 73 73 69 | 6f 6e 2e 0d 46 6f 72 20 |expressi|on..For |
|00002740| 65 78 61 6d 70 6c 65 2c | 20 69 6e 73 74 65 61 64 |example,| instead|
|00002750| 20 6f 66 20 74 68 65 20 | 73 79 6d 62 6f 6c 20 5c | of the |symbol \|
|00002760| 64 63 6f 64 65 7b 73 6f | 6e 7d 20 77 65 20 63 61 |dcode{so|n} we ca|
|00002770| 6e 20 75 73 65 20 74 68 | 65 20 73 74 72 69 6e 67 |n use th|e string|
|00002780| 0d 5c 64 63 6f 64 65 7b | 22 53 6f 6e 22 7d 3a 0d |.\dcode{|"Son"}:.|
|00002790| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|000027a0| 0d 3e 20 28 6c 65 76 65 | 6c 2d 6e 61 6d 65 73 20 |.> (leve|l-names |
|000027b0| 73 6f 6e 20 3a 70 72 65 | 66 69 78 20 22 53 6f 6e |son :pre|fix "Son|
|000027c0| 22 29 0d 28 22 53 6f 6e | 28 53 29 22 20 22 53 6f |").("Son|(S)" "So|
|000027d0| 6e 28 49 29 22 20 22 53 | 6f 6e 28 4e 29 22 20 22 |n(I)" "S|on(N)" "|
|000027e0| 53 6f 6e 28 55 29 22 29 | 0d 5c 65 6e 64 7b 76 65 |Son(U)")|.\end{ve|
|000027f0| 72 62 61 74 69 6d 7d 0d | 0d 55 73 69 6e 67 20 69 |rbatim}.|.Using i|
|00002800| 6e 64 69 63 61 74 6f 72 | 20 76 61 72 69 61 62 6c |ndicator| variabl|
|00002810| 65 73 20 61 6e 64 20 6c | 65 76 65 6c 20 6c 61 62 |es and l|evel lab|
|00002820| 65 6c 73 2c 20 77 65 20 | 63 61 6e 20 6e 6f 77 20 |els, we |can now |
|00002830| 66 69 74 20 61 6e 20 61 | 64 64 69 74 69 76 65 0d |fit an a|dditive.|
|00002840| 6d 6f 64 65 6c 20 61 73 | 0d 5c 62 65 67 69 6e 7b |model as|.\begin{|
|00002850| 76 65 72 62 61 74 69 6d | 7d 0d 3e 20 28 64 65 66 |verbatim|}.> (def|
|00002860| 20 6d 6f 62 2d 61 64 64 | 0d 20 20 20 20 20 20 20 | mob-add|. |
|00002870| 28 70 6f 69 73 73 6f 6e | 72 65 67 2d 6d 6f 64 65 |(poisson|reg-mode|
|00002880| 6c 0d 20 20 20 20 20 20 | 20 20 28 61 70 70 65 6e |l. | (appen|
|00002890| 64 20 28 69 6e 64 69 63 | 61 74 6f 72 73 20 73 6f |d (indic|ators so|
|000028a0| 6e 29 20 28 69 6e 64 69 | 63 61 74 6f 72 73 20 66 |n) (indi|cators f|
|000028b0| 61 74 68 65 72 29 29 20 | 63 6f 75 6e 74 73 0d 20 |ather)) |counts. |
|000028c0| 20 20 20 20 20 20 20 3a | 70 72 65 64 69 63 74 6f | :|predicto|
|000028d0| 72 2d 6e 61 6d 65 73 20 | 28 61 70 70 65 6e 64 20 |r-names |(append |
|000028e0| 28 6c 65 76 65 6c 2d 6e | 61 6d 65 73 20 73 6f 6e |(level-n|ames son|
|000028f0| 20 3a 70 72 65 66 69 78 | 20 27 73 6f 6e 29 0d 20 | :prefix| 'son). |
|00002900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002920| 28 6c 65 76 65 6c 2d 6e | 61 6d 65 73 20 66 61 74 |(level-n|ames fat|
|00002930| 68 65 72 20 3a 70 72 65 | 66 69 78 20 27 66 61 74 |her :pre|fix 'fat|
|00002940| 68 65 72 29 29 29 29 0d | 0d 49 74 65 72 61 74 69 |her)))).|.Iterati|
|00002950| 6f 6e 20 31 3a 20 64 65 | 76 69 61 6e 63 65 20 3d |on 1: de|viance =|
|00002960| 20 31 30 30 37 2e 39 37 | 0d 49 74 65 72 61 74 69 | 1007.97|.Iterati|
|00002970| 6f 6e 20 32 3a 20 64 65 | 76 69 61 6e 63 65 20 3d |on 2: de|viance =|
|00002980| 20 38 30 37 2e 34 38 34 | 0d 49 74 65 72 61 74 69 | 807.484|.Iterati|
|00002990| 6f 6e 20 33 3a 20 64 65 | 76 69 61 6e 63 65 20 3d |on 3: de|viance =|
|000029a0| 20 37 39 32 2e 33 38 39 | 0d 49 74 65 72 61 74 69 | 792.389|.Iterati|
|000029b0| 6f 6e 20 34 3a 20 64 65 | 76 69 61 6e 63 65 20 3d |on 4: de|viance =|
|000029c0| 20 37 39 32 2e 31 39 0d | 49 74 65 72 61 74 69 6f | 792.19.|Iteratio|
|000029d0| 6e 20 35 3a 20 64 65 76 | 69 61 6e 63 65 20 3d 20 |n 5: dev|iance = |
|000029e0| 37 39 32 2e 31 39 0d 0d | 57 65 69 67 68 74 65 64 |792.19..|Weighted|
|000029f0| 20 4c 65 61 73 74 20 53 | 71 75 61 72 65 73 20 45 | Least S|quares E|
|00002a00| 73 74 69 6d 61 74 65 73 | 3a 0d 0d 43 6f 6e 73 74 |stimates|:..Const|
|00002a10| 61 6e 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ant | |
|00002a20| 20 20 20 20 20 31 2e 33 | 36 32 37 33 20 20 20 28 | 1.3|6273 (|
|00002a30| 30 2e 31 33 30 30 30 31 | 29 0d 53 4f 4e 28 53 29 |0.130001|).SON(S)|
|00002a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a50| 20 20 20 20 31 2e 35 32 | 38 39 32 20 20 20 28 30 | 1.52|892 (0|
|00002a60| 2e 31 30 37 31 34 29 0d | 53 4f 4e 28 49 29 20 20 |.10714).|SON(I) |
|00002a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a80| 20 20 31 2e 34 36 35 36 | 31 20 20 20 28 30 2e 31 | 1.4656|1 (0.1|
|00002a90| 30 37 37 36 32 29 0d 53 | 4f 4e 28 4e 29 20 20 20 |07762).S|ON(N) |
|00002aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ab0| 20 32 2e 36 30 31 32 39 | 20 20 20 28 30 2e 31 30 | 2.60129| (0.10|
|00002ac0| 30 36 36 37 29 0d 53 4f | 4e 28 55 29 20 20 20 20 |0667).SO|N(U) |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ae0| 32 2e 32 36 31 31 37 20 | 20 20 28 30 2e 31 30 32 |2.26117 | (0.102|
|00002af0| 30 36 35 29 0d 46 41 54 | 48 45 52 28 53 29 20 20 |065).FAT|HER(S) |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00002b10| 2e 33 34 34 37 35 20 20 | 20 28 30 2e 30 39 38 38 |.34475 | (0.0988|
|00002b20| 35 34 31 29 0d 46 41 54 | 48 45 52 28 49 29 20 20 |541).FAT|HER(I) |
|00002b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00002b40| 2e 33 39 30 31 36 20 20 | 20 28 30 2e 30 39 38 33 |.39016 | (0.0983|
|00002b50| 39 39 34 29 0d 46 41 54 | 48 45 52 28 4e 29 20 20 |994).FAT|HER(N) |
|00002b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 32 | | 2|
|00002b70| 2e 34 36 30 30 35 20 20 | 20 28 30 2e 30 39 31 37 |.46005 | (0.0917|
|00002b80| 32 38 39 29 0d 46 41 54 | 48 45 52 28 55 29 20 20 |289).FAT|HER(U) |
|00002b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00002ba0| 2e 38 38 33 30 37 20 20 | 20 28 30 2e 30 39 34 35 |.88307 | (0.0945|
|00002bb0| 30 34 39 29 0d 0d 53 63 | 61 6c 65 20 74 61 6b 65 |049)..Sc|ale take|
|00002bc0| 6e 20 61 73 3a 20 20 20 | 20 20 20 20 20 20 20 20 |n as: | |
|00002bd0| 20 20 20 20 20 20 31 0d | 44 65 76 69 61 6e 63 65 | 1.|Deviance|
|00002be0| 3a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |: | |
|00002bf0| 20 20 20 37 39 32 2e 31 | 39 0d 4e 75 6d 62 65 72 | 792.1|9.Number|
|00002c00| 20 6f 66 20 63 61 73 65 | 73 3a 20 20 20 20 20 20 | of case|s: |
|00002c10| 20 20 20 20 20 20 20 20 | 20 32 35 0d 44 65 67 72 | | 25.Degr|
|00002c20| 65 65 73 20 6f 66 20 66 | 72 65 65 64 6f 6d 3a 20 |ees of f|reedom: |
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 20 31 36 0d 5c 65 | | 16.\e|
|00002c40| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 45 78 61 |nd{verba|tim}.Exa|
|00002c50| 6d 69 6e 69 6e 67 20 74 | 68 65 20 72 65 73 69 64 |mining t|he resid|
|00002c60| 75 61 6c 73 20 75 73 69 | 6e 67 20 20 0d 5c 62 65 |uals usi|ng .\be|
|00002c70| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0d 28 73 |gin{verb|atim}.(s|
|00002c80| 65 6e 64 20 6d 6f 62 2d | 61 64 64 20 3a 70 6c 6f |end mob-|add :plo|
|00002c90| 74 2d 72 65 73 69 64 75 | 61 6c 73 29 0d 5c 65 6e |t-residu|als).\en|
|00002ca0| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0d 73 68 6f 77 |d{verbat|im}.show|
|00002cb0| 73 20 74 68 61 74 20 74 | 68 65 20 66 69 72 73 74 |s that t|he first|
|00002cc0| 20 63 65 6c 6c 20 69 73 | 20 61 6e 20 6f 75 74 6c | cell is| an outl|
|00002cd0| 69 65 72 20 2d 2d 20 74 | 68 65 20 6d 6f 64 65 6c |ier -- t|he model|
|00002ce0| 20 64 6f 65 73 20 6e 6f | 74 20 66 69 74 20 74 68 | does no|t fit th|
|00002cf0| 69 73 0d 63 65 6c 6c 20 | 77 65 6c 6c 2e 0d 0d 54 |is.cell |well...T|
|00002d00| 6f 20 66 69 74 20 61 20 | 73 61 74 75 72 61 74 65 |o fit a |saturate|
|00002d10| 64 20 6d 6f 64 65 6c 20 | 74 6f 20 74 68 65 73 65 |d model |to these|
|00002d20| 20 64 61 74 61 2c 20 77 | 65 20 6e 65 65 64 20 74 | data, w|e need t|
|00002d30| 68 65 20 63 72 6f 73 73 | 20 70 72 6f 64 75 63 74 |he cross| product|
|00002d40| 73 20 6f 66 0d 74 68 65 | 20 69 6e 64 69 63 61 74 |s of.the| indicat|
|00002d50| 6f 72 20 76 61 72 69 61 | 62 6c 65 73 20 61 6e 64 |or varia|bles and|
|00002d60| 20 61 6c 73 6f 20 61 20 | 63 6f 72 72 65 73 70 6f | also a |correspo|
|00002d70| 6e 64 69 6e 67 20 73 65 | 74 20 6f 66 20 6c 61 62 |nding se|t of lab|
|00002d80| 65 6c 73 2e 20 54 68 65 | 0d 69 6e 64 69 63 61 74 |els. The|.indicat|
|00002d90| 6f 72 73 20 61 72 65 20 | 70 72 6f 64 75 63 65 64 |ors are |produced|
|00002da0| 20 77 69 74 68 20 74 68 | 65 20 5c 64 63 6f 64 65 | with th|e \dcode|
|00002db0| 7b 63 72 6f 73 73 2d 74 | 65 72 6d 73 7d 20 66 75 |{cross-t|erms} fu|
|00002dc0| 6e 63 74 69 6f 6e 0d 5c | 62 65 67 69 6e 7b 76 65 |nction.\|begin{ve|
|00002dd0| 72 62 61 74 69 6d 7d 0d | 3e 20 28 63 72 6f 73 73 |rbatim}.|> (cross|
|00002de0| 2d 74 65 72 6d 73 20 28 | 69 6e 64 69 63 61 74 6f |-terms (|indicato|
|00002df0| 72 73 20 73 6f 6e 29 20 | 28 69 6e 64 69 63 61 74 |rs son) |(indicat|
|00002e00| 6f 72 73 20 66 61 74 68 | 65 72 29 29 0d 28 28 30 |ors fath|er)).((0|
|00002e10| 20 30 20 30 20 30 20 30 | 20 30 20 31 20 30 20 30 | 0 0 0 0| 0 1 0 0|
|00002e20| 20 30 20 30 20 30 20 30 | 20 30 20 30 20 30 20 30 | 0 0 0 0| 0 0 0 0|
|00002e30| 20 30 20 30 20 30 20 30 | 20 30 20 30 20 30 20 30 | 0 0 0 0| 0 0 0 0|
|00002e40| 29 0d 20 28 30 20 30 20 | 30 20 30 20 30 20 30 20 |). (0 0 |0 0 0 0 |
|00002e50| 30 20 30 20 30 20 30 20 | 30 20 31 20 30 20 30 20 |0 0 0 0 |0 1 0 0 |
|00002e60| 30 20 30 20 30 20 30 20 | 30 20 30 20 30 20 30 20 |0 0 0 0 |0 0 0 0 |
|00002e70| 30 20 30 20 30 29 0d 20 | 2e 2e 2e 29 0d 5c 65 6e |0 0 0). |...).\en|
|00002e80| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0d 61 6e 64 20 |d{verbat|im}.and |
|00002e90| 74 68 65 20 6e 61 6d 65 | 73 20 77 69 74 68 20 74 |the name|s with t|
|00002ea0| 68 65 20 5c 64 63 6f 64 | 65 7b 63 72 6f 73 73 2d |he \dcod|e{cross-|
|00002eb0| 6e 61 6d 65 73 7d 20 66 | 75 6e 63 74 69 6f 6e 3a |names} f|unction:|
|00002ec0| 0d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00002ed0| 7d 0d 3e 20 28 63 72 6f | 73 73 2d 6e 61 6d 65 73 |}.> (cro|ss-names|
|00002ee0| 20 28 6c 65 76 65 6c 2d | 6e 61 6d 65 73 20 73 6f | (level-|names so|
|00002ef0| 6e 20 3a 70 72 65 66 69 | 78 20 27 73 6f 6e 29 0d |n :prefi|x 'son).|
|00002f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00002f10| 6c 65 76 65 6c 2d 6e 61 | 6d 65 73 20 66 61 74 68 |level-na|mes fath|
|00002f20| 65 72 20 3a 70 72 65 66 | 69 78 20 27 66 61 74 68 |er :pref|ix 'fath|
|00002f30| 65 72 29 29 0d 28 22 53 | 4f 4e 28 53 29 2e 46 41 |er)).("S|ON(S).FA|
|00002f40| 54 48 45 52 28 53 29 22 | 20 22 53 4f 4e 28 53 29 |THER(S)"| "SON(S)|
|00002f50| 2e 46 41 54 48 45 52 28 | 49 29 22 20 2e 2e 2e 29 |.FATHER(|I)" ...)|
|00002f60| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|00002f70| 54 68 65 20 73 61 74 75 | 72 61 74 65 64 20 6d 6f |The satu|rated mo|
|00002f80| 64 65 6c 20 63 61 6e 20 | 6e 6f 77 20 62 65 20 66 |del can |now be f|
|00002f90| 69 74 20 62 79 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |it by.\b|egin{ver|
|00002fa0| 62 61 74 69 6d 7d 0d 3e | 20 28 6c 65 74 20 28 28 |batim}.>| (let ((|
|00002fb0| 73 20 28 69 6e 64 69 63 | 61 74 6f 72 73 20 73 6f |s (indic|ators so|
|00002fc0| 6e 29 29 0d 20 20 20 20 | 20 20 20 20 28 66 20 28 |n)). | (f (|
|00002fd0| 69 6e 64 69 63 61 74 6f | 72 73 20 66 61 74 68 65 |indicato|rs fathe|
|00002fe0| 72 29 29 0d 20 20 20 20 | 20 20 20 20 28 73 6e 20 |r)). | (sn |
|00002ff0| 28 6c 65 76 65 6c 2d 6e | 61 6d 65 73 20 73 6f 6e |(level-n|ames son|
|00003000| 20 3a 70 72 65 66 69 78 | 20 27 73 6f 6e 29 29 0d | :prefix| 'son)).|
|00003010| 20 20 20 20 20 20 20 20 | 28 66 6e 20 28 6c 65 76 | |(fn (lev|
|00003020| 65 6c 2d 6e 61 6d 65 73 | 20 66 61 74 68 65 72 20 |el-names| father |
|00003030| 3a 70 72 65 66 69 78 20 | 27 66 61 74 68 65 72 29 |:prefix |'father)|
|00003040| 29 29 0d 20 20 20 20 28 | 64 65 66 20 6d 6f 62 2d |)). (|def mob-|
|00003050| 73 61 74 0d 20 20 20 20 | 20 20 20 20 20 28 70 6f |sat. | (po|
|00003060| 69 73 73 6f 6e 72 65 67 | 2d 6d 6f 64 65 6c 20 28 |issonreg|-model (|
|00003070| 61 70 70 65 6e 64 20 73 | 20 66 20 28 63 72 6f 73 |append s| f (cros|
|00003080| 73 2d 74 65 72 6d 73 20 | 73 20 66 29 29 20 63 6f |s-terms |s f)) co|
|00003090| 75 6e 74 73 20 0d 20 20 | 20 20 20 20 20 20 20 20 |unts . | |
|000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030b0| 20 3a 70 72 65 64 69 63 | 74 6f 72 2d 6e 61 6d 65 | :predic|tor-name|
|000030c0| 73 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|000030d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 61 70 | | (ap|
|000030e0| 70 65 6e 64 20 73 6e 20 | 66 6e 20 28 63 72 6f 73 |pend sn |fn (cros|
|000030f0| 73 2d 6e 61 6d 65 73 20 | 73 6e 20 66 6e 29 29 29 |s-names |sn fn)))|
|00003100| 29 29 0d 0d 49 74 65 72 | 61 74 69 6f 6e 20 31 3a |))..Iter|ation 1:|
|00003110| 20 64 65 76 69 61 6e 63 | 65 20 3d 20 35 2e 30 36 | devianc|e = 5.06|
|00003120| 32 36 32 65 2d 31 34 0d | 49 74 65 72 61 74 69 6f |262e-14.|Iteratio|
|00003130| 6e 20 32 3a 20 64 65 76 | 69 61 6e 63 65 20 3d 20 |n 2: dev|iance = |
|00003140| 32 2e 34 34 32 34 39 65 | 2d 31 35 0d 0d 57 65 69 |2.44249e|-15..Wei|
|00003150| 67 68 74 65 64 20 4c 65 | 61 73 74 20 53 71 75 61 |ghted Le|ast Squa|
|00003160| 72 65 73 20 45 73 74 69 | 6d 61 74 65 73 3a 0d 0d |res Esti|mates:..|
|00003170| 43 6f 6e 73 74 61 6e 74 | 20 20 20 20 20 20 20 20 |Constant| |
|00003180| 20 20 20 20 20 20 20 20 | 20 20 33 2e 39 31 32 30 | | 3.9120|
|00003190| 32 20 20 20 28 30 2e 31 | 34 31 34 32 31 29 0d 53 |2 (0.1|41421).S|
|000031a0| 4f 4e 28 53 29 20 20 20 | 20 20 20 20 20 20 20 20 |ON(S) | |
|000031b0| 20 20 20 20 20 20 20 2d | 30 2e 31 30 35 33 36 31 | -|0.105361|
|000031c0| 20 20 20 28 30 2e 32 30 | 35 34 38 29 0d 53 4f 4e | (0.20|548).SON|
|000031d0| 28 49 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(I) | |
|000031e0| 20 20 20 20 20 20 2d 31 | 2e 38 33 32 35 38 20 20 | -1|.83258 |
|000031f0| 20 28 30 2e 33 38 30 37 | 38 39 29 0d 53 4f 4e 28 | (0.3807|89).SON(|
|00003200| 4e 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N) | |
|00003210| 20 20 20 20 20 2d 31 2e | 30 32 31 36 35 20 20 20 | -1.|02165 |
|00003220| 28 30 2e 32 37 34 38 37 | 34 29 0d 53 4f 4e 28 55 |(0.27487|4).SON(U|
|00003230| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00003240| 20 20 20 20 2d 31 2e 38 | 33 32 35 38 20 20 20 28 | -1.8|3258 (|
|00003250| 30 2e 33 38 30 37 38 39 | 29 0d 46 41 54 48 45 52 |0.380789|).FATHER|
|00003260| 28 53 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(S) | |
|00003270| 20 20 2d 30 2e 35 37 39 | 38 31 38 20 20 20 28 30 | -0.579|818 (0|
|00003280| 2e 32 33 36 30 33 39 29 | 0d 46 41 54 48 45 52 28 |.236039)|.FATHER(|
|00003290| 49 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |I) | |
|000032a0| 20 20 2d 31 2e 35 31 34 | 31 33 20 20 20 28 30 2e | -1.514|13 (0.|
|000032b0| 33 33 33 30 33 29 0d 46 | 41 54 48 45 52 28 4e 29 |33303).F|ATHER(N)|
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032d0| 2d 31 2e 32 37 32 39 37 | 20 20 20 28 30 2e 33 30 |-1.27297| (0.30|
|000032e0| 32 33 37 32 29 0d 46 41 | 54 48 45 52 28 55 29 20 |2372).FA|THER(U) |
|000032f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2d | | -|
|00003300| 32 2e 38 31 33 34 31 20 | 20 20 28 30 2e 35 39 34 |2.81341 | (0.594|
|00003310| 34 31 38 29 0d 53 4f 4e | 28 53 29 2e 46 41 54 48 |418).SON|(S).FATH|
|00003320| 45 52 28 53 29 20 20 20 | 20 20 20 20 20 20 20 31 |ER(S) | 1|
|00003330| 2e 39 33 32 32 31 20 20 | 20 28 30 2e 32 38 39 32 |.93221 | (0.2892|
|00003340| 38 31 29 0d 53 4f 4e 28 | 53 29 2e 46 41 54 48 45 |81).SON(|S).FATHE|
|00003350| 52 28 49 29 20 20 20 20 | 20 20 20 20 20 20 32 2e |R(I) | 2.|
|00003360| 30 36 34 31 37 20 20 20 | 28 30 2e 33 38 32 30 33 |06417 |(0.38203|
|00003370| 36 29 0d 53 4f 4e 28 53 | 29 2e 46 41 54 48 45 52 |6).SON(S|).FATHER|
|00003380| 28 4e 29 20 20 20 20 20 | 20 20 20 20 20 32 2e 34 |(N) | 2.4|
|00003390| 37 36 39 34 20 20 20 28 | 30 2e 33 34 36 38 36 38 |7694 (|0.346868|
|000033a0| 29 0d 53 4f 4e 28 53 29 | 2e 46 41 54 48 45 52 28 |).SON(S)|.FATHER(|
|000033b0| 55 29 20 20 20 20 20 20 | 20 20 20 20 32 2e 37 34 |U) | 2.74|
|000033c0| 34 34 32 20 20 20 28 30 | 2e 36 33 31 39 35 33 29 |442 (0|.631953)|
|000033d0| 0d 53 4f 4e 28 49 29 2e | 46 41 54 48 45 52 28 53 |.SON(I).|FATHER(S|
|000033e0| 29 20 20 20 20 20 20 20 | 20 20 20 32 2e 39 33 31 |) | 2.931|
|000033f0| 31 39 20 20 20 28 30 2e | 34 33 38 38 38 34 29 0d |19 (0.|438884).|
|00003400| 53 4f 4e 28 49 29 2e 46 | 41 54 48 45 52 28 49 29 |SON(I).F|ATHER(I)|
|00003410| 20 20 20 20 20 20 20 20 | 20 20 34 2e 31 33 35 31 | | 4.1351|
|00003420| 37 20 20 20 28 30 2e 34 | 39 34 39 37 35 29 0d 53 |7 (0.4|94975).S|
|00003430| 4f 4e 28 49 29 2e 46 41 | 54 48 45 52 28 4e 29 20 |ON(I).FA|THER(N) |
|00003440| 20 20 20 20 20 20 20 20 | 20 34 2e 34 31 33 38 38 | | 4.41388|
|00003450| 20 20 20 28 30 2e 34 37 | 30 39 39 33 29 0d 53 4f | (0.47|0993).SO|
|00003460| 4e 28 49 29 2e 46 41 54 | 48 45 52 28 55 29 20 20 |N(I).FAT|HER(U) |
|00003470| 20 20 20 20 20 20 20 20 | 35 2e 30 31 30 36 34 20 | |5.01064 |
|00003480| 20 20 28 30 2e 37 30 31 | 35 38 36 29 0d 53 4f 4e | (0.701|586).SON|
|00003490| 28 4e 29 2e 46 41 54 48 | 45 52 28 53 29 20 20 20 |(N).FATH|ER(S) |
|000034a0| 20 20 20 20 20 20 20 20 | 32 2e 37 32 36 34 20 20 | |2.7264 |
|000034b0| 20 28 30 2e 33 34 33 31 | 36 37 29 0d 53 4f 4e 28 | (0.3431|67).SON(|
|000034c0| 4e 29 2e 46 41 54 48 45 | 52 28 49 29 20 20 20 20 |N).FATHE|R(I) |
|000034d0| 20 20 20 20 20 20 34 2e | 30 33 30 39 33 20 20 20 | 4.|03093 |
|000034e0| 28 30 2e 34 31 33 34 36 | 29 0d 53 4f 4e 28 4e 29 |(0.41346|).SON(N)|
|000034f0| 2e 46 41 54 48 45 52 28 | 4e 29 20 20 20 20 20 20 |.FATHER(|N) |
|00003500| 20 20 20 20 34 2e 39 35 | 33 34 38 20 20 20 28 30 | 4.95|348 (0|
|00003510| 2e 33 38 35 32 30 37 29 | 0d 53 4f 4e 28 4e 29 2e |.385207)|.SON(N).|
|00003520| 46 41 54 48 45 52 28 55 | 29 20 20 20 20 20 20 20 |FATHER(U|) |
|00003530| 20 20 20 35 2e 36 39 31 | 33 36 20 20 20 28 30 2e | 5.691|36 (0.|
|00003540| 36 34 31 38 38 33 29 0d | 53 4f 4e 28 55 29 2e 46 |641883).|SON(U).F|
|00003550| 41 54 48 45 52 28 53 29 | 20 20 20 20 20 20 20 20 |ATHER(S)| |
|00003560| 20 20 32 2e 35 30 37 37 | 31 20 20 20 28 30 2e 34 | 2.5077|1 (0.4|
|00003570| 34 35 39 37 38 29 0d 53 | 4f 4e 28 55 29 2e 46 41 |45978).S|ON(U).FA|
|00003580| 54 48 45 52 28 49 29 20 | 20 20 20 20 20 20 20 20 |THER(I) | |
|00003590| 20 33 2e 39 39 39 30 33 | 20 20 20 28 30 2e 34 39 | 3.99903| (0.49|
|000035a0| 36 33 31 32 29 0d 53 4f | 4e 28 55 29 2e 46 41 54 |6312).SO|N(U).FAT|
|000035b0| 48 45 52 28 4e 29 20 20 | 20 20 20 20 20 20 20 20 |HER(N) | |
|000035c0| 35 2e 32 39 36 30 38 20 | 20 20 28 30 2e 34 36 37 |5.29608 | (0.467|
|000035d0| 36 31 37 29 0d 53 4f 4e | 28 55 29 2e 46 41 54 48 |617).SON|(U).FATH|
|000035e0| 45 52 28 55 29 20 20 20 | 20 20 20 20 20 20 20 36 |ER(U) | 6|
|000035f0| 2e 37 35 32 35 36 20 20 | 20 28 30 2e 36 39 33 33 |.75256 | (0.6933|
|00003600| 37 33 29 0d 0d 53 63 61 | 6c 65 20 74 61 6b 65 6e |73)..Sca|le taken|
|00003610| 20 61 73 3a 20 20 20 20 | 20 20 20 20 20 20 20 20 | as: | |
|00003620| 20 20 20 20 20 31 0d 44 | 65 76 69 61 6e 63 65 3a | 1.D|eviance:|
|00003630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 33 2e | | 3.|
|00003640| 33 37 35 30 38 65 2d 31 | 34 0d 4e 75 6d 62 65 72 |37508e-1|4.Number|
|00003650| 20 6f 66 20 63 61 73 65 | 73 3a 20 20 20 20 20 20 | of case|s: |
|00003660| 20 20 20 20 20 20 20 20 | 20 32 35 0d 44 65 67 72 | | 25.Degr|
|00003670| 65 65 73 20 6f 66 20 66 | 72 65 65 64 6f 6d 3a 20 |ees of f|reedom: |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 30 0d 5c 65 | | 0.\e|
|00003690| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0d 5c 73 |nd{verba|tim}..\s|
|000036a0| 65 63 74 69 6f 6e 7b 53 | 74 72 75 63 74 75 72 65 |ection{S|tructure|
|000036b0| 20 6f 66 20 74 68 65 20 | 47 65 6e 65 72 61 6c 69 | of the |Generali|
|000036c0| 7a 65 64 20 4c 69 6e 65 | 61 72 20 4d 6f 64 65 6c |zed Line|ar Model|
|000036d0| 20 53 79 73 74 65 6d 7d | 0d 5c 73 75 62 73 65 63 | System}|.\subsec|
|000036e0| 74 69 6f 6e 7b 4d 6f 64 | 65 6c 20 50 72 6f 74 6f |tion{Mod|el Proto|
|000036f0| 74 79 70 65 73 7d 0d 54 | 68 65 20 6d 6f 64 65 6c |types}.T|he model|
|00003700| 20 6f 62 6a 65 63 74 73 | 20 61 72 65 20 6f 72 67 | objects| are org|
|00003710| 61 6e 69 7a 65 64 20 69 | 6e 74 6f 20 73 65 76 65 |anized i|nto seve|
|00003720| 72 61 6c 20 70 72 6f 74 | 6f 74 79 70 65 73 2c 20 |ral prot|otypes, |
|00003730| 77 69 74 68 20 74 68 65 | 0d 67 65 6e 65 72 61 6c |with the|.general|
|00003740| 20 70 72 6f 74 6f 74 79 | 70 65 20 5c 64 63 6f 64 | prototy|pe \dcod|
|00003750| 65 7b 67 6c 69 6d 2d 70 | 72 6f 74 6f 7d 20 69 6e |e{glim-p|roto} in|
|00003760| 68 65 72 69 74 69 6e 67 | 20 66 72 6f 6d 0d 5c 64 |heriting| from.\d|
|00003770| 63 6f 64 65 7b 72 65 67 | 72 65 73 73 69 6f 6e 2d |code{reg|ression-|
|00003780| 6d 6f 64 65 6c 2d 70 72 | 6f 74 6f 7d 2c 20 74 68 |model-pr|oto}, th|
|00003790| 65 20 70 72 6f 74 6f 74 | 79 70 65 20 66 6f 72 20 |e protot|ype for |
|000037a0| 6e 6f 72 6d 61 6c 20 6c | 69 6e 65 61 72 0d 72 65 |normal l|inear.re|
|000037b0| 67 72 65 73 73 69 6f 6e | 20 6d 6f 64 65 6c 73 2e |gression| models.|
|000037c0| 20 54 68 65 20 69 6e 68 | 65 72 69 74 61 6e 63 65 | The inh|eritance|
|000037d0| 20 74 72 65 65 20 69 73 | 20 73 68 6f 77 6e 20 69 | tree is| shown i|
|000037e0| 6e 20 46 69 67 75 72 65 | 0d 5c 72 65 66 7b 47 4c |n Figure|.\ref{GL|
|000037f0| 49 4d 54 72 65 65 7d 2e | 0d 5c 62 65 67 69 6e 7b |IMTree}.|.\begin{|
|00003800| 66 69 67 75 72 65 7d 0d | 5c 62 65 67 69 6e 7b 63 |figure}.|\begin{c|
|00003810| 65 6e 74 65 72 7d 0d 5c | 62 65 67 69 6e 7b 70 69 |enter}.\|begin{pi|
|00003820| 63 74 75 72 65 7d 28 34 | 30 30 2c 31 36 30 29 0d |cture}(4|00,160).|
|00003830| 5c 70 75 74 28 31 34 30 | 2c 31 34 30 29 7b 5c 77 |\put(140|,140){\w|
|00003840| 70 72 6f 74 6f 69 6d 61 | 67 65 7b 72 65 67 72 65 |protoima|ge{regre|
|00003850| 73 73 69 6f 6e 2d 6d 6f | 64 65 6c 2d 70 72 6f 74 |ssion-mo|del-prot|
|00003860| 6f 7d 7d 0d 5c 70 75 74 | 28 31 35 30 2c 37 30 29 |o}}.\put|(150,70)|
|00003870| 7b 5c 70 72 6f 74 6f 69 | 6d 61 67 65 7b 67 6c 69 |{\protoi|mage{gli|
|00003880| 6d 2d 70 72 6f 74 6f 7d | 7d 0d 5c 70 75 74 28 30 |m-proto}|}.\put(0|
|00003890| 2c 30 29 7b 5c 70 72 6f | 74 6f 69 6d 61 67 65 7b |,0){\pro|toimage{|
|000038a0| 70 6f 69 73 73 6f 6e 72 | 65 67 2d 70 72 6f 74 6f |poissonr|eg-proto|
|000038b0| 7d 7d 0d 5c 70 75 74 28 | 31 35 30 2c 30 29 7b 5c |}}.\put(|150,0){\|
|000038c0| 70 72 6f 74 6f 69 6d 61 | 67 65 7b 62 69 6e 6f 6d |protoima|ge{binom|
|000038d0| 69 61 6c 72 65 67 2d 70 | 72 6f 74 6f 7d 7d 0d 5c |ialreg-p|roto}}.\|
|000038e0| 70 75 74 28 33 30 30 2c | 30 29 7b 5c 70 72 6f 74 |put(300,|0){\prot|
|000038f0| 6f 69 6d 61 67 65 7b 67 | 61 6d 6d 61 72 65 67 2d |oimage{g|ammareg-|
|00003900| 70 72 6f 74 6f 7d 7d 0d | 5c 70 75 74 28 32 30 30 |proto}}.|\put(200|
|00003910| 2c 31 34 30 29 7b 5c 6c | 69 6e 65 28 30 2c 2d 31 |,140){\l|ine(0,-1|
|00003920| 29 7b 35 30 7d 7d 0d 5c | 70 75 74 28 32 30 30 2c |){50}}.\|put(200,|
|00003930| 37 30 29 7b 5c 6c 69 6e | 65 28 2d 33 2c 2d 31 29 |70){\lin|e(-3,-1)|
|00003940| 7b 31 35 30 7d 7d 0d 5c | 70 75 74 28 32 30 30 2c |{150}}.\|put(200,|
|00003950| 37 30 29 7b 5c 6c 69 6e | 65 28 33 2c 2d 31 29 7b |70){\lin|e(3,-1){|
|00003960| 31 35 30 7d 7d 0d 5c 70 | 75 74 28 32 30 30 2c 37 |150}}.\p|ut(200,7|
|00003970| 30 29 7b 5c 6c 69 6e 65 | 28 30 2c 2d 31 29 7b 35 |0){\line|(0,-1){5|
|00003980| 30 7d 7d 0d 5c 65 6e 64 | 7b 70 69 63 74 75 72 65 |0}}.\end|{picture|
|00003990| 7d 0d 5c 65 6e 64 7b 63 | 65 6e 74 65 72 7d 0d 5c |}.\end{c|enter}.\|
|000039a0| 63 61 70 74 69 6f 6e 7b | 48 69 65 72 61 72 63 68 |caption{|Hierarch|
|000039b0| 79 20 6f 66 20 67 65 6e | 65 72 61 6c 69 7a 65 64 |y of gen|eralized|
|000039c0| 20 6c 69 6e 65 61 72 20 | 6d 6f 64 65 6c 20 70 72 | linear |model pr|
|000039d0| 6f 74 6f 74 79 70 65 73 | 2e 7d 0d 5c 6c 61 62 65 |ototypes|.}.\labe|
|000039e0| 6c 7b 47 4c 49 4d 54 72 | 65 65 7d 0d 5c 65 6e 64 |l{GLIMTr|ee}.\end|
|000039f0| 7b 66 69 67 75 72 65 7d | 0d 54 68 69 73 20 69 6e |{figure}|.This in|
|00003a00| 68 65 72 69 74 61 6e 63 | 65 20 63 61 70 74 75 72 |heritanc|e captur|
|00003a10| 65 73 20 74 68 65 20 72 | 65 61 73 6f 6e 69 6e 67 |es the r|easoning|
|00003a20| 20 62 79 20 61 6e 61 6c | 6f 67 79 20 74 6f 20 74 | by anal|ogy to t|
|00003a30| 68 65 20 6c 69 6e 65 61 | 72 20 63 61 73 65 0d 74 |he linea|r case.t|
|00003a40| 68 61 74 20 69 73 20 74 | 68 65 20 62 61 73 69 73 |hat is t|he basis|
|00003a50| 20 66 6f 72 20 6d 61 6e | 79 20 69 64 65 61 73 20 | for man|y ideas |
|00003a60| 69 6e 20 74 68 65 20 61 | 6e 61 6c 79 73 69 73 20 |in the a|nalysis |
|00003a70| 6f 66 20 67 65 6e 65 72 | 61 6c 69 7a 65 64 20 6c |of gener|alized l|
|00003a80| 69 6e 65 61 72 0d 6d 6f | 64 65 6c 73 2e 20 54 68 |inear.mo|dels. Th|
|00003a90| 65 20 66 69 74 74 69 6e | 67 20 73 74 72 61 74 65 |e fittin|g strate|
|00003aa0| 67 79 20 75 73 65 73 20 | 69 74 65 72 61 74 69 76 |gy uses |iterativ|
|00003ab0| 65 6c 79 20 72 65 77 65 | 69 67 68 74 65 64 20 6c |ely rewe|ighted l|
|00003ac0| 65 61 73 74 20 73 71 75 | 61 72 65 73 0d 62 79 20 |east squ|ares.by |
|00003ad0| 63 68 61 6e 67 69 6e 67 | 20 74 68 65 20 77 65 69 |changing| the wei|
|00003ae0| 67 68 74 20 76 65 63 74 | 6f 72 20 69 6e 20 74 68 |ght vect|or in th|
|00003af0| 65 20 6d 6f 64 65 6c 20 | 61 6e 64 20 72 65 70 65 |e model |and repe|
|00003b00| 61 74 65 64 6c 79 20 63 | 61 6c 6c 69 6e 67 20 74 |atedly c|alling t|
|00003b10| 68 65 0d 6c 69 6e 65 61 | 72 20 72 65 67 72 65 73 |he.linea|r regres|
|00003b20| 73 69 6f 6e 20 5c 64 63 | 6f 64 65 7b 3a 63 6f 6d |sion \dc|ode{:com|
|00003b30| 70 75 74 65 7d 20 6d 65 | 74 68 6f 64 2e 0d 0d 43 |pute} me|thod...C|
|00003b40| 6f 6e 76 65 72 67 65 6e | 63 65 20 6f 66 20 74 68 |onvergen|ce of th|
|00003b50| 65 20 69 74 65 72 61 74 | 69 6f 6e 73 20 69 73 20 |e iterat|ions is |
|00003b60| 64 65 74 65 72 6d 69 6e | 65 64 20 62 79 20 63 6f |determin|ed by co|
|00003b70| 6d 70 61 72 69 6e 67 20 | 74 68 65 20 72 65 6c 61 |mparing |the rela|
|00003b80| 74 69 76 65 0d 63 68 61 | 6e 67 65 20 69 6e 20 74 |tive.cha|nge in t|
|00003b90| 68 65 20 63 6f 65 66 66 | 69 63 69 65 6e 74 73 20 |he coeff|icients |
|00003ba0| 61 6e 64 20 74 68 65 20 | 63 68 61 6e 67 65 20 69 |and the |change i|
|00003bb0| 6e 20 74 68 65 20 64 65 | 76 69 61 6e 63 65 20 74 |n the de|viance t|
|00003bc0| 6f 20 63 75 74 6f 66 66 | 0d 76 61 6c 75 65 73 2e |o cutoff|.values.|
|00003bd0| 20 54 68 65 20 69 74 65 | 72 61 74 69 6f 6e 20 74 | The ite|ration t|
|00003be0| 65 72 6d 69 6e 61 74 65 | 73 20 69 66 20 65 69 74 |erminate|s if eit|
|00003bf0| 68 65 72 20 63 68 61 6e | 67 65 20 66 61 6c 6c 73 |her chan|ge falls|
|00003c00| 20 62 65 6c 6f 77 20 74 | 68 65 0d 63 6f 72 72 65 | below t|he.corre|
|00003c10| 73 70 6f 6e 64 69 6e 67 | 20 63 75 74 6f 66 66 73 |sponding| cutoffs|
|00003c20| 2e 20 54 68 65 20 63 75 | 74 6f 66 66 73 20 61 72 |. The cu|toffs ar|
|00003c30| 65 20 73 65 74 20 61 6e | 64 20 72 65 74 72 69 65 |e set an|d retrie|
|00003c40| 76 65 64 20 62 79 20 74 | 68 65 0d 5c 64 63 6f 64 |ved by t|he.\dcod|
|00003c50| 65 7b 3a 65 70 73 69 6c | 6f 6e 7d 20 61 6e 64 20 |e{:epsil|on} and |
|00003c60| 5c 64 63 6f 64 65 7b 3a | 65 70 73 69 6c 6f 6e 2d |\dcode{:|epsilon-|
|00003c70| 64 65 76 7d 20 6d 65 74 | 68 6f 64 73 2e 20 54 68 |dev} met|hods. Th|
|00003c80| 65 20 64 65 66 61 75 6c | 74 20 76 61 6c 75 65 73 |e defaul|t values|
|00003c90| 0d 61 72 65 20 67 69 76 | 65 6e 20 62 79 0d 5c 62 |.are giv|en by.\b|
|00003ca0| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 3e |egin{ver|batim}.>|
|00003cb0| 20 28 73 65 6e 64 20 67 | 6c 69 6d 2d 70 72 6f 74 | (send g|lim-prot|
|00003cc0| 6f 20 3a 65 70 73 69 6c | 6f 6e 29 0d 31 65 2d 30 |o :epsil|on).1e-0|
|00003cd0| 36 0d 3e 20 28 73 65 6e | 64 20 67 6c 69 6d 2d 70 |6.> (sen|d glim-p|
|00003ce0| 72 6f 74 6f 20 3a 65 70 | 73 69 6c 6f 6e 2d 64 65 |roto :ep|silon-de|
|00003cf0| 76 29 0d 30 2e 30 30 31 | 0d 5c 65 6e 64 7b 76 65 |v).0.001|.\end{ve|
|00003d00| 72 62 61 74 69 6d 7d 0d | 41 20 6c 69 6d 69 74 20 |rbatim}.|A limit |
|00003d10| 69 73 20 61 6c 73 6f 20 | 69 6d 70 6f 73 65 64 20 |is also |imposed |
|00003d20| 6f 6e 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |on the n|umber of|
|00003d30| 20 69 74 65 72 61 74 69 | 6f 6e 73 2e 20 54 68 65 | iterati|ons. The|
|00003d40| 20 6c 69 6d 69 74 20 69 | 73 20 73 65 74 0d 61 6e | limit i|s set.an|
|00003d50| 64 20 72 65 74 72 69 65 | 76 65 64 20 62 79 20 74 |d retrie|ved by t|
|00003d60| 68 65 20 5c 64 63 6f 64 | 65 7b 3a 63 6f 75 6e 74 |he \dcod|e{:count|
|00003d70| 2d 6c 69 6d 69 74 7d 20 | 6d 65 73 73 61 67 65 2e |-limit} |message.|
|00003d80| 20 54 68 65 20 64 65 66 | 61 75 6c 74 20 76 61 6c | The def|ault val|
|00003d90| 75 65 0d 69 73 20 67 69 | 76 65 6e 20 62 79 0d 5c |ue.is gi|ven by.\|
|00003da0| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0d |begin{ve|rbatim}.|
|00003db0| 3e 20 28 73 65 6e 64 20 | 67 6c 69 6d 2d 70 72 6f |> (send |glim-pro|
|00003dc0| 74 6f 20 3a 63 6f 75 6e | 74 2d 6c 69 6d 69 74 29 |to :coun|t-limit)|
|00003dd0| 0d 33 30 0d 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 |.30.\end|{verbati|
|00003de0| 6d 7d 0d 0d 54 68 65 20 | 61 6e 61 6c 6f 67 79 20 |m}..The |analogy |
|00003df0| 63 61 70 74 75 72 65 64 | 20 69 6e 20 74 68 65 20 |captured| in the |
|00003e00| 69 6e 68 65 72 69 74 61 | 6e 63 65 20 6f 66 20 74 |inherita|nce of t|
|00003e10| 68 65 20 5c 64 63 6f 64 | 65 7b 67 6c 69 6d 2d 70 |he \dcod|e{glim-p|
|00003e20| 72 6f 74 6f 7d 0d 70 72 | 6f 74 6f 74 79 70 65 20 |roto}.pr|ototype |
|00003e30| 66 72 6f 6d 20 74 68 65 | 20 6e 6f 72 6d 61 6c 20 |from the| normal |
|00003e40| 6c 69 6e 65 61 72 20 72 | 65 67 72 65 73 73 69 6f |linear r|egressio|
|00003e50| 6e 20 70 72 6f 74 6f 74 | 79 70 65 20 69 73 20 62 |n protot|ype is b|
|00003e60| 61 73 65 64 0d 70 72 69 | 6d 61 72 69 6c 79 20 6f |ased.pri|marily o|
|00003e70| 6e 20 74 68 65 20 63 6f | 6d 70 75 74 61 74 69 6f |n the co|mputatio|
|00003e80| 6e 61 6c 20 70 72 6f 63 | 65 73 73 2c 20 6e 6f 74 |nal proc|ess, not|
|00003e90| 20 74 68 65 20 6d 6f 64 | 65 6c 69 6e 67 20 70 72 | the mod|eling pr|
|00003ea0| 6f 63 65 73 73 2e 20 41 | 73 20 61 0d 72 65 73 75 |ocess. A|s a.resu|
|00003eb0| 6c 74 2c 20 73 65 76 65 | 72 61 6c 20 61 63 63 65 |lt, seve|ral acce|
|00003ec0| 73 73 6f 72 20 6d 65 74 | 68 6f 64 73 20 69 6e 68 |ssor met|hods inh|
|00003ed0| 65 72 69 74 65 64 20 66 | 72 6f 6d 20 74 68 65 20 |erited f|rom the |
|00003ee0| 6c 69 6e 65 61 72 20 72 | 65 67 72 65 73 73 69 6f |linear r|egressio|
|00003ef0| 6e 0d 6f 62 6a 65 63 74 | 20 72 65 66 65 72 20 74 |n.object| refer t|
|00003f00| 6f 20 61 6e 61 6c 6f 67 | 6f 75 73 20 63 6f 6d 70 |o analog|ous comp|
|00003f10| 6f 6e 65 6e 74 73 20 6f | 66 20 74 68 65 20 63 6f |onents o|f the co|
|00003f20| 6d 70 75 74 61 74 69 6f | 6e 61 6c 20 70 72 6f 63 |mputatio|nal proc|
|00003f30| 65 73 73 2c 0d 72 61 74 | 68 65 72 20 74 68 61 6e |ess,.rat|her than|
|00003f40| 20 61 6e 61 6c 6f 67 6f | 75 73 20 63 6f 6d 70 6f | analogo|us compo|
|00003f50| 6e 65 6e 74 73 20 6f 66 | 20 74 68 65 20 6d 6f 64 |nents of| the mod|
|00003f60| 65 6c 2e 20 54 77 6f 20 | 65 78 61 6d 70 6c 65 73 |el. Two |examples|
|00003f70| 20 61 72 65 20 74 68 65 | 0d 6d 65 73 73 61 67 65 | are the|.message|
|00003f80| 73 20 5c 64 63 6f 64 65 | 7b 3a 77 65 69 67 68 74 |s \dcode|{:weight|
|00003f90| 73 7d 20 61 6e 64 20 5c | 64 63 6f 64 65 7b 3a 79 |s} and \|dcode{:y|
|00003fa0| 7d 2e 20 54 68 65 20 77 | 65 69 67 68 74 20 76 65 |}. The w|eight ve|
|00003fb0| 63 74 6f 72 20 69 6e 20 | 74 68 65 0d 6f 62 6a 65 |ctor in |the.obje|
|00003fc0| 63 74 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 5c |ct retur|ned by \|
|00003fd0| 64 63 6f 64 65 7b 3a 77 | 65 69 67 68 74 73 7d 20 |dcode{:w|eights} |
|00003fe0| 69 73 20 74 68 65 20 66 | 69 6e 61 6c 20 73 65 74 |is the f|inal set|
|00003ff0| 20 6f 66 20 77 65 69 67 | 68 74 73 0d 6f 62 74 61 | of weig|hts.obta|
|00004000| 69 6e 65 64 20 69 6e 20 | 74 68 65 20 66 69 74 3b |ined in |the fit;|
|00004010| 20 70 72 69 6f 72 20 77 | 65 69 67 68 74 73 20 63 | prior w|eights c|
|00004020| 61 6e 20 62 65 20 73 65 | 74 20 61 6e 64 20 72 65 |an be se|t and re|
|00004030| 74 72 69 65 76 65 64 20 | 77 69 74 68 20 74 68 65 |trieved |with the|
|00004040| 0d 5c 64 63 6f 64 65 7b | 3a 70 77 65 69 67 68 74 |.\dcode{|:pweight|
|00004050| 73 7d 20 6d 65 73 73 61 | 67 65 2e 20 54 68 65 20 |s} messa|ge. The |
|00004060| 76 61 6c 75 65 20 72 65 | 74 75 72 6e 65 64 20 62 |value re|turned b|
|00004070| 79 20 74 68 65 20 5c 64 | 63 6f 64 65 7b 3a 79 7d |y the \d|code{:y}|
|00004080| 0d 6d 65 73 73 61 67 65 | 20 69 73 20 74 68 65 20 |.message| is the |
|00004090| 61 72 74 69 66 69 63 69 | 61 6c 20 64 65 70 65 6e |artifici|al depen|
|000040a0| 64 65 6e 74 20 76 61 72 | 69 61 62 6c 65 0d 5c 62 |dent var|iable.\b|
|000040b0| 65 67 69 6e 7b 64 69 73 | 70 6c 61 79 6d 61 74 68 |egin{dis|playmath|
|000040c0| 7d 0d 7a 20 3d 20 5c 65 | 74 61 20 2b 20 28 79 20 |}.z = \e|ta + (y |
|000040d0| 2d 20 5c 6d 75 29 20 5c | 66 72 61 63 7b 64 5c 65 |- \mu) \|frac{d\e|
|000040e0| 74 61 7d 7b 64 5c 6d 75 | 7d 0d 5c 65 6e 64 7b 64 |ta}{d\mu|}.\end{d|
|000040f0| 69 73 70 6c 61 79 6d 61 | 74 68 7d 0d 63 6f 6e 73 |isplayma|th}.cons|
|00004100| 74 72 75 63 74 65 64 20 | 69 6e 20 74 68 65 20 69 |tructed |in the i|
|00004110| 74 65 72 61 74 69 6f 6e | 3b 20 74 68 65 20 61 63 |teration|; the ac|
|00004120| 74 75 61 6c 20 64 65 70 | 65 6e 64 65 6e 74 20 76 |tual dep|endent v|
|00004130| 61 72 69 61 62 6c 65 20 | 63 61 6e 20 62 65 0d 6f |ariable |can be.o|
|00004140| 62 74 61 69 6e 65 64 20 | 61 6e 64 20 63 68 61 6e |btained |and chan|
|00004150| 67 65 64 20 77 69 74 68 | 20 74 68 65 20 5c 64 63 |ged with| the \dc|
|00004160| 6f 64 65 7b 3a 79 76 61 | 72 7d 20 6d 65 73 73 61 |ode{:yva|r} messa|
|00004170| 67 65 2e 0d 0d 54 68 65 | 20 6d 65 73 73 61 67 65 |ge...The| message|
|00004180| 20 5c 64 63 6f 64 65 7b | 3a 65 74 61 7d 20 72 65 | \dcode{|:eta} re|
|00004190| 74 75 72 6e 73 20 74 68 | 65 20 63 75 72 72 65 6e |turns th|e curren|
|000041a0| 74 20 6c 69 6e 65 61 72 | 20 70 72 65 64 69 63 74 |t linear| predict|
|000041b0| 6f 72 20 76 61 6c 75 65 | 73 2c 0d 69 6e 63 6c 75 |or value|s,.inclu|
|000041c0| 64 69 6e 67 20 61 6e 79 | 20 6f 66 66 73 65 74 2e |ding any| offset.|
|000041d0| 20 54 68 65 20 5c 64 63 | 6f 64 65 7b 3a 6f 66 66 | The \dc|ode{:off|
|000041e0| 73 65 74 7d 20 6d 65 73 | 73 61 67 65 20 73 65 74 |set} mes|sage set|
|000041f0| 73 20 61 6e 64 20 72 65 | 74 72 69 65 76 65 73 0d |s and re|trieves.|
|00004200| 74 68 65 20 6f 66 66 73 | 65 74 20 76 61 6c 75 65 |the offs|et value|
|00004210| 2e 20 46 6f 72 20 62 69 | 6e 6f 6d 69 61 6c 20 6d |. For bi|nomial m|
|00004220| 6f 64 65 6c 73 2c 20 74 | 68 65 20 5c 64 63 6f 64 |odels, t|he \dcod|
|00004230| 65 7b 3a 74 72 69 61 6c | 73 7d 20 6d 65 73 73 61 |e{:trial|s} messa|
|00004240| 67 65 0d 73 65 74 73 20 | 61 6e 64 20 72 65 74 72 |ge.sets |and retr|
|00004250| 69 65 76 65 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |ieves th|e number|
|00004260| 20 6f 66 20 74 72 69 61 | 6c 73 20 66 6f 72 20 65 | of tria|ls for e|
|00004270| 61 63 68 20 6f 62 73 65 | 72 76 61 74 69 6f 6e 2e |ach obse|rvation.|
|00004280| 0d 0d 54 68 65 20 73 63 | 61 6c 65 20 66 61 63 74 |..The sc|ale fact|
|00004290| 6f 72 20 69 73 20 73 65 | 74 20 61 6e 64 20 72 65 |or is se|t and re|
|000042a0| 74 72 69 65 76 65 64 20 | 77 69 74 68 20 74 68 65 |trieved |with the|
|000042b0| 20 5c 64 63 6f 64 65 7b | 3a 73 63 61 6c 65 7d 20 | \dcode{|:scale} |
|000042c0| 6d 65 73 73 61 67 65 2e | 0d 53 6f 6d 65 20 6d 6f |message.|.Some mo|
|000042d0| 64 65 6c 73 20 70 65 72 | 6d 69 74 20 74 68 65 20 |dels per|mit the |
|000042e0| 65 73 74 69 6d 61 74 69 | 6f 6e 20 6f 66 20 61 20 |estimati|on of a |
|000042f0| 73 63 61 6c 65 20 70 61 | 72 61 6d 65 74 65 72 2e |scale pa|rameter.|
|00004300| 20 46 6f 72 20 74 68 65 | 73 65 0d 6d 6f 64 65 6c | For the|se.model|
|00004310| 73 2c 20 74 68 65 20 66 | 69 74 74 69 6e 67 20 73 |s, the f|itting s|
|00004320| 79 73 74 65 6d 20 75 73 | 65 73 20 74 68 65 20 5c |ystem us|es the \|
|00004330| 64 63 6f 64 65 7b 3a 66 | 69 74 2d 73 63 61 6c 65 |dcode{:f|it-scale|
|00004340| 7d 20 6d 65 73 73 61 67 | 65 20 74 6f 0d 6f 62 74 |} messag|e to.obt|
|00004350| 61 69 6e 20 61 20 6e 65 | 77 20 73 63 61 6c 65 20 |ain a ne|w scale |
|00004360| 76 61 6c 75 65 2e 20 54 | 68 65 20 6d 65 73 73 61 |value. T|he messa|
|00004370| 67 65 20 5c 64 63 6f 64 | 65 7b 3a 65 73 74 69 6d |ge \dcod|e{:estim|
|00004380| 61 74 65 2d 73 63 61 6c | 65 7d 0d 64 65 74 65 72 |ate-scal|e}.deter|
|00004390| 6d 69 6e 65 73 20 61 6e | 64 20 73 65 74 73 20 77 |mines an|d sets w|
|000043a0| 68 65 74 68 65 72 20 74 | 68 65 20 73 63 61 6c 65 |hether t|he scale|
|000043b0| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 74 6f | paramet|er is to|
|000043c0| 20 62 65 20 65 73 74 69 | 6d 61 74 65 64 20 6f 72 | be esti|mated or|
|000043d0| 0d 6e 6f 74 2e 0d 0d 44 | 65 76 69 61 6e 63 65 73 |.not...D|eviances|
|000043e0| 20 6f 66 20 69 6e 64 69 | 76 69 64 75 61 6c 20 6f | of indi|vidual o|
|000043f0| 62 73 65 72 76 61 74 69 | 6f 6e 73 2c 20 74 68 65 |bservati|ons, the|
|00004400| 20 74 6f 74 61 6c 20 64 | 65 76 69 61 6e 63 65 2c | total d|eviance,|
|00004410| 20 61 6e 64 20 74 68 65 | 20 6d 65 61 6e 0d 64 65 | and the| mean.de|
|00004420| 76 69 61 6e 63 65 20 61 | 72 65 20 72 65 74 75 72 |viance a|re retur|
|00004430| 6e 65 64 20 62 79 20 74 | 68 65 20 6d 65 73 73 61 |ned by t|he messa|
|00004440| 67 65 73 20 5c 64 63 6f | 64 65 7b 3a 64 65 76 69 |ges \dco|de{:devi|
|00004450| 61 6e 63 65 73 7d 2c 0d | 5c 64 63 6f 64 65 7b 3a |ances},.|\dcode{:|
|00004460| 64 65 76 69 61 6e 63 65 | 7d 20 61 6e 64 20 5c 64 |deviance|} and \d|
|00004470| 63 6f 64 65 7b 3a 6d 65 | 61 6e 2d 64 65 76 69 61 |code{:me|an-devia|
|00004480| 6e 63 65 7d 2c 20 72 65 | 73 70 65 63 74 69 76 65 |nce}, re|spective|
|00004490| 6c 79 2e 20 54 68 65 0d | 5c 64 63 6f 64 65 7b 3a |ly. The.|\dcode{:|
|000044a0| 64 65 76 69 61 6e 63 65 | 7d 20 61 6e 64 20 5c 64 |deviance|} and \d|
|000044b0| 63 6f 64 65 7b 3a 6d 65 | 61 6e 2d 64 65 76 69 61 |code{:me|an-devia|
|000044c0| 6e 63 65 7d 20 6d 65 74 | 68 6f 64 73 20 61 64 6a |nce} met|hods adj|
|000044d0| 75 73 74 73 20 66 6f 72 | 0d 6f 6d 69 74 74 65 64 |usts for|.omitted|
|000044e0| 20 6f 62 73 65 72 76 61 | 74 69 6f 6e 73 2c 20 61 | observa|tions, a|
|000044f0| 6e 64 20 74 68 65 20 64 | 65 6e 6f 6d 69 6e 61 74 |nd the d|enominat|
|00004500| 6f 72 20 66 6f 72 20 74 | 68 65 20 6d 65 61 6e 20 |or for t|he mean |
|00004510| 64 65 76 69 61 6e 63 65 | 20 69 73 0d 61 64 6a 75 |deviance| is.adju|
|00004520| 73 74 65 64 20 66 6f 72 | 20 74 68 65 20 64 65 67 |sted for| the deg|
|00004530| 72 65 65 73 20 6f 66 20 | 66 72 65 65 64 6f 6d 20 |rees of |freedom |
|00004540| 61 76 61 69 6c 61 62 6c | 65 2e 0d 0d 4d 6f 73 74 |availabl|e...Most|
|00004550| 20 69 6e 68 65 72 69 74 | 65 64 20 6d 65 74 68 6f | inherit|ed metho|
|00004560| 64 73 20 66 6f 72 20 72 | 65 73 69 64 75 61 6c 73 |ds for r|esiduals|
|00004570| 2c 20 73 74 61 6e 64 61 | 72 64 20 65 72 72 6f 72 |, standa|rd error|
|00004580| 73 2c 20 65 74 63 2e 2c | 20 73 68 6f 75 6c 64 0d |s, etc.,| should.|
|00004590| 6d 61 6b 65 20 73 65 6e | 73 65 20 61 74 20 6c 65 |make sen|se at le|
|000045a0| 61 73 74 20 61 73 20 61 | 70 70 72 6f 78 69 6d 61 |ast as a|pproxima|
|000045b0| 74 69 6f 6e 73 2e 20 46 | 6f 72 20 65 78 61 6d 70 |tions. F|or examp|
|000045c0| 6c 65 2c 20 72 65 73 69 | 64 75 61 6c 73 20 72 65 |le, resi|duals re|
|000045d0| 74 75 72 6e 65 64 0d 62 | 79 20 74 68 65 20 69 6e |turned.b|y the in|
|000045e0| 68 65 72 69 74 65 64 20 | 5c 64 63 6f 64 65 7b 3a |herited |\dcode{:|
|000045f0| 72 65 73 69 64 75 61 6c | 73 7d 20 6d 65 73 73 61 |residual|s} messa|
|00004600| 67 65 20 63 6f 72 72 65 | 73 70 6f 6e 64 20 74 6f |ge corre|spond to|
|00004610| 20 74 68 65 20 50 65 61 | 72 73 6f 6e 0d 72 65 73 | the Pea|rson.res|
|00004620| 69 64 75 61 6c 73 20 66 | 6f 72 20 67 65 6e 65 72 |iduals f|or gener|
|00004630| 61 6c 69 7a 65 64 20 6c | 69 6e 65 61 72 20 6d 6f |alized l|inear mo|
|00004640| 64 65 6c 73 2e 20 4f 74 | 68 65 72 20 66 6f 72 6d |dels. Ot|her form|
|00004650| 73 20 6f 66 20 72 65 73 | 69 64 75 61 6c 73 20 61 |s of res|iduals a|
|00004660| 72 65 0d 72 65 74 75 72 | 6e 65 64 20 62 79 20 74 |re.retur|ned by t|
|00004670| 68 65 20 6d 65 73 73 61 | 67 65 73 20 5c 64 63 6f |he messa|ges \dco|
|00004680| 64 65 7b 3a 63 68 69 2d | 72 65 73 69 64 75 61 6c |de{:chi-|residual|
|00004690| 73 7d 2c 0d 5c 64 63 6f | 64 65 7b 3a 64 65 76 69 |s},.\dco|de{:devi|
|000046a0| 61 6e 63 65 2d 72 65 73 | 69 64 75 61 6c 73 7d 2c |ance-res|iduals},|
|000046b0| 20 5c 64 63 6f 64 65 7b | 3a 67 32 2d 72 65 73 69 | \dcode{|:g2-resi|
|000046c0| 64 75 61 6c 73 7d 2c 0d | 5c 64 63 6f 64 65 7b 3a |duals},.|\dcode{:|
|000046d0| 72 61 77 2d 72 65 73 69 | 64 75 61 6c 73 7d 2c 20 |raw-resi|duals}, |
|000046e0| 5c 64 63 6f 64 65 7b 3a | 73 74 61 6e 64 61 72 64 |\dcode{:|standard|
|000046f0| 69 7a 65 64 2d 63 68 69 | 2d 72 65 73 69 64 75 61 |ized-chi|-residua|
|00004700| 6c 73 7d 2c 20 61 6e 64 | 0d 5c 64 63 6f 64 65 7b |ls}, and|.\dcode{|
|00004710| 3a 73 74 61 6e 64 61 72 | 64 69 7a 65 64 2d 64 65 |:standar|dized-de|
|00004720| 76 69 61 6e 63 65 2d 72 | 65 73 69 64 75 61 6c 73 |viance-r|esiduals|
|00004730| 7d 2e 0d 0d 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |}...\sub|section{|
|00004740| 45 72 72 6f 72 20 53 74 | 72 75 63 74 75 72 65 73 |Error St|ructures|
|00004750| 7d 0d 54 68 65 20 65 72 | 72 6f 72 20 73 74 72 75 |}.The er|ror stru|
|00004760| 63 74 75 72 65 20 6f 66 | 20 61 20 67 65 6e 65 72 |cture of| a gener|
|00004770| 61 6c 69 7a 65 64 20 6c | 69 6e 65 61 72 20 6d 6f |alized l|inear mo|
|00004780| 64 65 6c 20 61 66 66 65 | 63 74 73 20 66 6f 75 72 |del affe|cts four|
|00004790| 20 6d 65 74 68 6f 64 73 | 0d 61 6e 64 20 74 77 6f | methods|.and two|
|000047a0| 20 73 6c 6f 74 73 20 54 | 68 65 20 6d 65 74 68 6f | slots T|he metho|
|000047b0| 64 73 20 61 72 65 20 63 | 61 6c 6c 65 64 20 61 73 |ds are c|alled as|
|000047c0| 0d 5c 62 65 67 69 6e 7b | 66 6c 75 73 68 6c 65 66 |.\begin{|flushlef|
|000047d0| 74 7d 5c 74 74 0d 28 73 | 65 6e 64 20 5c 70 61 72 |t}\tt.(s|end \par|
|000047e0| 61 6d 7b 6d 7d 20 3a 69 | 6e 69 74 69 61 6c 2d 6d |am{m} :i|nitial-m|
|000047f0| 65 61 6e 73 29 5c 5c 0d | 28 73 65 6e 64 20 5c 70 |eans)\\.|(send \p|
|00004800| 61 72 61 6d 7b 6d 7d 20 | 3a 66 69 74 2d 76 61 72 |aram{m} |:fit-var|
|00004810| 69 61 6e 63 65 73 20 5c | 70 61 72 61 6d 7b 6d 75 |iances \|param{mu|
|00004820| 7d 29 5c 5c 0d 28 73 65 | 6e 64 20 5c 70 61 72 61 |})\\.(se|nd \para|
|00004830| 6d 7b 6d 7d 20 3a 66 69 | 74 2d 64 65 76 69 61 6e |m{m} :fi|t-devian|
|00004840| 63 65 73 20 20 5c 70 61 | 72 61 6d 7b 6d 75 7d 29 |ces \pa|ram{mu})|
|00004850| 5c 5c 0d 28 73 65 6e 64 | 20 5c 70 61 72 61 6d 7b |\\.(send| \param{|
|00004860| 6d 7d 20 3a 66 69 74 2d | 73 63 61 6c 65 29 0d 5c |m} :fit-|scale).\|
|00004870| 65 6e 64 7b 66 6c 75 73 | 68 6c 65 66 74 7d 0d 54 |end{flus|hleft}.T|
|00004880| 68 65 20 5c 64 63 6f 64 | 65 7b 3a 69 6e 69 74 69 |he \dcod|e{:initi|
|00004890| 61 6c 2d 6d 65 61 6e 73 | 7d 20 6d 65 74 68 6f 64 |al-means|} method|
|000048a0| 20 73 68 6f 75 6c 64 20 | 72 65 74 75 72 6e 20 61 | should |return a|
|000048b0| 6e 20 69 6e 69 74 69 61 | 6c 20 65 73 74 69 6d 61 |n initia|l estima|
|000048c0| 74 65 20 6f 66 0d 74 68 | 65 20 6d 65 61 6e 73 20 |te of.th|e means |
|000048d0| 66 6f 72 20 74 68 65 20 | 69 74 65 72 61 74 69 76 |for the |iterativ|
|000048e0| 65 20 73 65 61 72 63 68 | 2e 20 54 68 65 20 64 65 |e search|. The de|
|000048f0| 66 61 75 6c 74 20 6d 65 | 74 68 6f 64 20 73 69 6d |fault me|thod sim|
|00004900| 70 6c 79 20 72 65 74 75 | 72 6e 73 0d 74 68 65 20 |ply retu|rns.the |
|00004910| 64 65 70 65 6e 64 65 6e | 74 20 76 61 72 69 61 62 |dependen|t variab|
|00004920| 6c 65 2c 20 62 75 74 20 | 66 6f 72 20 73 6f 6d 65 |le, but |for some|
|00004930| 20 6d 6f 64 65 6c 73 20 | 74 68 69 73 20 6d 61 79 | models |this may|
|00004940| 20 6e 65 65 64 20 74 6f | 20 62 65 0d 61 64 6a 75 | need to| be.adju|
|00004950| 73 74 65 64 20 74 6f 20 | 6d 6f 76 65 20 74 68 65 |sted to |move the|
|00004960| 20 69 6e 69 74 69 61 6c | 20 65 73 74 69 6d 61 74 | initial| estimat|
|00004970| 65 20 61 77 61 79 20 66 | 72 6f 6d 20 61 20 62 6f |e away f|rom a bo|
|00004980| 75 6e 64 61 72 79 2e 20 | 46 6f 72 0d 65 78 61 6d |undary. |For.exam|
|00004990| 70 6c 65 2c 20 74 68 65 | 20 6d 65 74 68 6f 64 20 |ple, the| method |
|000049a0| 66 6f 72 20 74 68 65 20 | 50 6f 69 73 73 6f 6e 20 |for the |Poisson |
|000049b0| 72 65 67 72 65 73 73 69 | 6f 6e 20 6d 6f 64 65 6c |regressi|on model|
|000049c0| 20 63 61 6e 20 62 65 20 | 64 65 66 69 6e 65 64 20 | can be |defined |
|000049d0| 61 73 0d 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |as.\begi|n{verbat|
|000049e0| 69 6d 7d 0d 28 64 65 66 | 6d 65 74 68 20 70 6f 69 |im}.(def|meth poi|
|000049f0| 73 73 6f 6e 72 65 67 2d | 70 72 6f 74 6f 20 3a 69 |ssonreg-|proto :i|
|00004a00| 6e 69 74 69 61 6c 2d 6d | 65 61 6e 73 20 28 29 20 |nitial-m|eans () |
|00004a10| 28 70 6d 61 78 20 28 73 | 65 6e 64 20 73 65 6c 66 |(pmax (s|end self|
|00004a20| 20 3a 79 76 61 72 29 20 | 30 2e 35 29 29 0d 5c 65 | :yvar) |0.5)).\e|
|00004a30| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 77 68 69 |nd{verba|tim}.whi|
|00004a40| 63 68 20 69 6e 73 75 72 | 65 73 20 74 68 61 74 20 |ch insur|es that |
|00004a50| 69 6e 69 74 69 61 6c 20 | 6d 65 61 6e 20 65 73 74 |initial |mean est|
|00004a60| 69 6d 61 74 65 73 20 61 | 72 65 20 61 74 20 6c 65 |imates a|re at le|
|00004a70| 61 73 74 20 30 2e 35 2e | 0d 0d 54 68 65 20 5c 64 |ast 0.5.|..The \d|
|00004a80| 63 6f 64 65 7b 3a 66 69 | 74 2d 76 61 72 69 61 6e |code{:fi|t-varian|
|00004a90| 63 65 73 7d 20 5c 64 63 | 6f 64 65 7b 3a 66 69 74 |ces} \dc|ode{:fit|
|00004aa0| 2d 64 65 76 69 61 6e 63 | 65 73 7d 20 6d 65 74 68 |-devianc|es} meth|
|00004ab0| 6f 64 73 20 72 65 74 75 | 72 6e 20 74 68 65 0d 76 |ods retu|rn the.v|
|00004ac0| 61 6c 75 65 73 20 6f 6e | 20 74 68 65 20 76 61 72 |alues on| the var|
|00004ad0| 69 61 6e 63 65 20 61 6e | 64 20 64 65 76 69 61 6e |iance an|d devian|
|00004ae0| 63 65 20 66 75 6e 63 74 | 69 6f 6e 73 20 66 6f 72 |ce funct|ions for|
|00004af0| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 76 65 63 | a speci|fied vec|
|00004b00| 74 6f 72 0d 6f 66 20 6d | 65 61 6e 73 2e 20 46 6f |tor.of m|eans. Fo|
|00004b10| 72 20 74 68 65 20 50 6f | 69 73 73 6f 6e 20 72 65 |r the Po|isson re|
|00004b20| 67 72 65 73 73 69 6f 6e | 20 6d 6f 64 65 6c 2c 20 |gression| model, |
|00004b30| 74 68 65 73 65 20 6d 65 | 74 68 6f 64 73 20 63 61 |these me|thods ca|
|00004b40| 6e 20 62 65 0d 64 65 66 | 69 6e 65 64 20 61 73 0d |n be.def|ined as.|
|00004b50| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|00004b60| 0d 28 64 65 66 6d 65 74 | 68 20 70 6f 69 73 73 6f |.(defmet|h poisso|
|00004b70| 6e 72 65 67 2d 70 72 6f | 74 6f 20 3a 66 69 74 2d |nreg-pro|to :fit-|
|00004b80| 76 61 72 69 61 6e 63 65 | 73 20 28 6d 75 29 20 6d |variance|s (mu) m|
|00004b90| 75 29 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |u).\end{|verbatim|
|00004ba0| 7d 0d 61 6e 64 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |}.and.\b|egin{ver|
|00004bb0| 62 61 74 69 6d 7d 0d 28 | 64 65 66 6d 65 74 68 20 |batim}.(|defmeth |
|00004bc0| 70 6f 69 73 73 6f 6e 72 | 65 67 2d 70 72 6f 74 6f |poissonr|eg-proto|
|00004bd0| 20 3a 66 69 74 2d 64 65 | 76 69 61 6e 63 65 73 20 | :fit-de|viances |
|00004be0| 28 6d 75 29 0d 20 20 28 | 66 6c 65 74 20 28 28 6c |(mu). (|flet ((l|
|00004bf0| 6f 67 2b 20 28 78 29 20 | 28 6c 6f 67 20 28 69 66 |og+ (x) |(log (if|
|00004c00| 2d 65 6c 73 65 20 28 3c | 20 30 20 78 29 20 78 20 |-else (<| 0 x) x |
|00004c10| 31 29 29 29 29 0d 20 20 | 20 20 28 6c 65 74 2a 20 |1)))). | (let* |
|00004c20| 28 28 79 20 28 73 65 6e | 64 20 73 65 6c 66 20 3a |((y (sen|d self :|
|00004c30| 79 76 61 72 29 29 0d 20 | 20 20 20 20 20 20 20 20 |yvar)). | |
|00004c40| 20 20 28 72 61 77 2d 64 | 65 76 20 28 2a 20 32 20 | (raw-d|ev (* 2 |
|00004c50| 28 2d 20 28 2a 20 79 20 | 28 6c 6f 67 2b 20 28 2f |(- (* y |(log+ (/|
|00004c60| 20 79 20 6d 75 29 29 29 | 20 28 2d 20 79 20 6d 75 | y mu)))| (- y mu|
|00004c70| 29 29 29 29 0d 20 20 20 | 20 20 20 20 20 20 20 20 |)))). | |
|00004c80| 28 70 77 20 28 73 65 6e | 64 20 73 65 6c 66 20 3a |(pw (sen|d self :|
|00004c90| 70 77 65 69 67 68 74 73 | 29 29 29 0d 20 20 20 20 |pweights|))). |
|00004ca0| 20 20 28 69 66 20 70 77 | 20 28 2a 20 70 77 20 72 | (if pw| (* pw r|
|00004cb0| 61 77 2d 64 65 76 29 20 | 72 61 77 2d 64 65 76 29 |aw-dev) |raw-dev)|
|00004cc0| 29 29 29 0d 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 |))).\end|{verbati|
|00004cd0| 6d 7d 0d 54 68 65 20 6c | 6f 63 61 6c 20 66 75 6e |m}.The l|ocal fun|
|00004ce0| 63 74 69 6f 6e 20 5c 64 | 63 6f 64 65 7b 6c 6f 67 |ction \d|code{log|
|00004cf0| 2b 7d 20 69 73 20 75 73 | 65 64 20 74 6f 20 61 76 |+} is us|ed to av|
|00004d00| 6f 69 64 20 74 61 6b 69 | 6e 67 20 74 68 65 20 6c |oid taki|ng the l|
|00004d10| 6f 67 61 72 69 74 68 6d | 0d 6f 66 20 7a 65 72 6f |ogarithm|.of zero|
|00004d20| 2e 0d 0d 54 68 65 20 66 | 69 6e 61 6c 20 6d 65 73 |...The f|inal mes|
|00004d30| 73 61 67 65 2c 20 5c 64 | 63 6f 64 65 7b 3a 66 69 |sage, \d|code{:fi|
|00004d40| 74 2d 73 63 61 6c 65 7d | 2c 20 69 73 20 6f 6e 6c |t-scale}|, is onl|
|00004d50| 79 20 75 73 65 64 20 62 | 79 20 74 68 65 0d 5c 64 |y used b|y the.\d|
|00004d60| 63 6f 64 65 7b 3a 64 69 | 73 70 6c 61 79 7d 20 6d |code{:di|splay} m|
|00004d70| 65 74 68 6f 64 2e 20 54 | 68 65 20 64 65 66 61 75 |ethod. T|he defau|
|00004d80| 6c 74 20 6d 65 74 68 6f | 64 20 72 65 74 75 72 6e |lt metho|d return|
|00004d90| 73 20 74 68 65 20 6d 65 | 61 6e 20 64 65 76 69 61 |s the me|an devia|
|00004da0| 6e 63 65 2e 0d 0d 54 68 | 65 20 74 77 6f 20 73 6c |nce...Th|e two sl|
|00004db0| 6f 74 73 20 72 65 6c 61 | 74 65 64 20 74 6f 20 74 |ots rela|ted to t|
|00004dc0| 68 65 20 65 72 72 6f 72 | 20 73 74 72 75 63 74 75 |he error| structu|
|00004dd0| 72 65 20 61 72 65 0d 5c | 64 63 6f 64 65 7b 65 73 |re are.\|dcode{es|
|00004de0| 74 69 6d 61 74 65 2d 73 | 63 61 6c 65 7d 20 61 6e |timate-s|cale} an|
|00004df0| 64 20 5c 64 63 6f 64 65 | 7b 6c 69 6e 6b 7d 2e 20 |d \dcode|{link}. |
|00004e00| 49 66 20 74 68 65 20 5c | 64 63 6f 64 65 7b 65 73 |If the \|dcode{es|
|00004e10| 74 69 6d 61 74 65 2d 73 | 63 61 6c 65 7d 0d 73 6c |timate-s|cale}.sl|
|00004e20| 6f 74 20 69 73 20 6e 6f | 74 20 5c 64 63 6f 64 65 |ot is no|t \dcode|
|00004e30| 7b 6e 69 6c 7d 2c 20 74 | 68 65 6e 20 61 20 73 63 |{nil}, t|hen a sc|
|00004e40| 61 6c 65 20 65 73 74 69 | 6d 61 74 65 20 69 73 20 |ale esti|mate is |
|00004e50| 63 6f 6d 70 75 74 65 64 | 20 61 6e 64 20 70 72 69 |computed| and pri|
|00004e60| 6e 74 65 64 0d 62 79 20 | 74 68 65 20 5c 64 63 6f |nted.by |the \dco|
|00004e70| 64 65 7b 3a 64 69 73 6c | 61 79 7d 20 6d 65 74 68 |de{:disl|ay} meth|
|00004e80| 6f 64 2e 20 54 68 65 20 | 5c 64 63 6f 64 65 7b 6c |od. The |\dcode{l|
|00004e90| 69 6e 6b 7d 20 73 6c 6f | 74 20 68 6f 6c 64 73 20 |ink} slo|t holds |
|00004ea0| 74 68 65 20 6c 69 6e 6b | 0d 6f 62 6a 65 63 74 20 |the link|.object |
|00004eb0| 75 73 65 64 20 62 79 20 | 74 68 65 20 6d 6f 64 65 |used by |the mode|
|00004ec0| 6c 2e 20 54 68 65 20 50 | 6f 69 73 73 6f 6e 20 6d |l. The P|oisson m|
|00004ed0| 6f 64 65 6c 20 64 6f 65 | 73 20 6e 6f 74 20 68 61 |odel doe|s not ha|
|00004ee0| 76 65 20 61 20 73 63 61 | 6c 65 0d 70 61 72 61 6d |ve a sca|le.param|
|00004ef0| 65 74 65 72 2c 20 61 6e | 64 20 74 68 65 20 63 61 |eter, an|d the ca|
|00004f00| 6e 6f 6e 69 63 61 6c 20 | 6c 69 6e 6b 20 69 73 20 |nonical |link is |
|00004f10| 74 68 65 20 6c 6f 67 69 | 74 20 6c 69 6e 6b 2e 20 |the logi|t link. |
|00004f20| 54 68 65 73 65 20 64 65 | 66 61 75 6c 74 73 20 63 |These de|faults c|
|00004f30| 61 6e 0d 62 65 20 73 65 | 74 20 62 79 20 74 68 65 |an.be se|t by the|
|00004f40| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 0d 5c 62 65 | express|ions.\be|
|00004f50| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0d 28 73 |gin{verb|atim}.(s|
|00004f60| 65 6e 64 20 70 6f 69 73 | 73 6f 6e 72 65 67 2d 70 |end pois|sonreg-p|
|00004f70| 72 6f 74 6f 20 3a 65 73 | 74 69 6d 61 74 65 2d 73 |roto :es|timate-s|
|00004f80| 63 61 6c 65 20 6e 69 6c | 29 0d 28 73 65 6e 64 20 |cale nil|).(send |
|00004f90| 70 6f 69 73 73 6f 6e 72 | 65 67 2d 70 72 6f 74 6f |poissonr|eg-proto|
|00004fa0| 20 3a 6c 69 6e 6b 20 6c | 6f 67 2d 6c 69 6e 6b 29 | :link l|og-link)|
|00004fb0| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|00004fc0| 0d 54 68 65 20 5c 64 63 | 6f 64 65 7b 67 6c 69 6d |.The \dc|ode{glim|
|00004fd0| 2d 70 72 6f 74 6f 7d 20 | 70 72 6f 74 6f 74 79 70 |-proto} |prototyp|
|00004fe0| 65 20 69 74 73 65 6c 66 | 20 75 73 65 73 20 6e 6f |e itself| uses no|
|00004ff0| 72 6d 61 6c 20 65 72 72 | 6f 72 73 20 61 6e 64 20 |rmal err|ors and |
|00005000| 61 6e 0d 69 64 65 6e 74 | 69 74 79 20 6c 69 6e 6b |an.ident|ity link|
|00005010| 2e 20 4f 74 68 65 72 20 | 65 72 72 6f 72 20 73 74 |. Other |error st|
|00005020| 72 75 63 74 75 72 65 73 | 20 63 61 6e 20 62 65 20 |ructures| can be |
|00005030| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 62 79 0d 63 |implemen|ted by.c|
|00005040| 6f 6e 73 74 72 75 63 74 | 69 6e 67 20 61 20 6e 65 |onstruct|ing a ne|
|00005050| 77 20 70 72 6f 74 6f 74 | 79 70 65 20 61 6e 64 20 |w protot|ype and |
|00005060| 64 65 66 69 6e 69 6e 67 | 20 61 70 70 72 6f 70 72 |defining| appropr|
|00005070| 69 61 74 65 20 6d 65 74 | 68 6f 64 73 20 61 6e 64 |iate met|hods and|
|00005080| 0d 64 65 66 61 75 6c 74 | 20 73 6c 6f 74 20 76 61 |.default| slot va|
|00005090| 6c 75 65 73 2e 0d 0d 5c | 73 75 62 73 65 63 74 69 |lues...\|subsecti|
|000050a0| 6f 6e 7b 4c 69 6e 6b 20 | 53 74 72 75 63 74 75 72 |on{Link |Structur|
|000050b0| 65 73 7d 0d 54 68 65 20 | 6c 69 6e 6b 20 66 75 6e |es}.The |link fun|
|000050c0| 63 74 69 6f 6e 20 24 67 | 24 20 66 6f 72 20 61 20 |ction $g|$ for a |
|000050d0| 67 65 6e 65 72 61 6c 69 | 7a 65 64 20 6c 69 6e 65 |generali|zed line|
|000050e0| 61 72 20 6d 6f 64 65 6c | 20 72 65 6c 61 74 65 73 |ar model| relates|
|000050f0| 20 74 68 65 0d 6c 69 6e | 65 61 72 20 70 72 65 64 | the.lin|ear pred|
|00005100| 69 63 74 6f 72 20 24 5c | 65 74 61 24 20 74 6f 20 |ictor $\|eta$ to |
|00005110| 74 68 65 20 6d 65 61 6e | 20 72 65 73 70 6f 6e 73 |the mean| respons|
|00005120| 65 20 24 5c 6d 75 24 20 | 62 79 0d 5c 62 65 67 69 |e $\mu$ |by.\begi|
|00005130| 6e 7b 64 69 73 70 6c 61 | 79 6d 61 74 68 7d 0d 5c |n{displa|ymath}.\|
|00005140| 65 74 61 20 3d 20 67 28 | 5c 6d 75 29 2e 0d 5c 65 |eta = g(|\mu)..\e|
|00005150| 6e 64 7b 64 69 73 70 6c | 61 79 6d 61 74 68 7d 0d |nd{displ|aymath}.|
|00005160| 4c 69 6e 6b 73 20 61 72 | 65 20 69 6d 70 6c 65 6d |Links ar|e implem|
|00005170| 65 6e 74 65 64 20 61 73 | 20 6f 62 6a 65 63 74 73 |ented as| objects|
|00005180| 2e 0d 54 61 62 6c 65 20 | 5c 72 65 66 7b 4c 69 6e |..Table |\ref{Lin|
|00005190| 6b 73 7d 20 6c 69 73 74 | 73 20 74 68 65 20 70 72 |ks} list|s the pr|
|000051a0| 65 2d 64 65 66 69 6e 65 | 64 20 6c 69 6e 6b 20 66 |e-define|d link f|
|000051b0| 75 6e 63 74 69 6f 6e 73 | 2c 20 61 6c 6f 6e 67 20 |unctions|, along |
|000051c0| 77 69 74 68 0d 74 68 65 | 20 65 78 70 72 65 73 73 |with.the| express|
|000051d0| 69 6f 6e 73 20 75 73 65 | 64 20 74 6f 20 72 65 74 |ions use|d to ret|
|000051e0| 75 72 6e 20 6c 69 6e 6b | 20 6f 62 6a 65 63 74 73 |urn link| objects|
|000051f0| 2e 0d 5c 62 65 67 69 6e | 7b 74 61 62 6c 65 7d 0d |..\begin|{table}.|
|00005200| 5c 63 61 70 74 69 6f 6e | 7b 4c 69 6e 6b 20 46 75 |\caption|{Link Fu|
|00005210| 6e 63 74 69 6f 6e 73 20 | 61 6e 64 20 45 78 70 72 |nctions |and Expr|
|00005220| 65 73 73 69 6f 6e 20 66 | 6f 72 20 4f 62 74 61 69 |ession f|or Obtai|
|00005230| 6e 69 6e 67 20 4c 69 6e | 6b 20 4f 62 6a 65 63 74 |ning Lin|k Object|
|00005240| 73 7d 0d 5c 6c 61 62 65 | 6c 7b 4c 69 6e 6b 73 7d |s}.\labe|l{Links}|
|00005250| 0d 5c 62 65 67 69 6e 7b | 63 65 6e 74 65 72 7d 0d |.\begin{|center}.|
|00005260| 5c 62 65 67 69 6e 7b 74 | 61 62 75 6c 61 72 7d 7b |\begin{t|abular}{|
|00005270| 6c 63 63 6c 7d 0d 5c 68 | 6c 69 6e 65 0d 4c 69 6e |lccl}.\h|line.Lin|
|00005280| 6b 20 26 20 46 6f 72 6d | 75 6c 61 20 26 20 44 6f |k & Form|ula & Do|
|00005290| 6d 61 69 6e 20 26 20 45 | 78 70 72 65 73 73 69 6f |main & E|xpressio|
|000052a0| 6e 5c 5c 0d 5c 68 6c 69 | 6e 65 0d 49 64 65 6e 74 |n\\.\hli|ne.Ident|
|000052b0| 69 74 79 20 20 20 20 26 | 20 24 5c 6d 75 24 20 20 |ity &| $\mu$ |
|000052c0| 20 20 20 20 26 20 24 28 | 2d 5c 69 6e 66 74 79 2c | & $(|-\infty,|
|000052d0| 20 5c 69 6e 66 74 79 29 | 24 20 26 20 5c 74 74 20 | \infty)|$ & \tt |
|000052e0| 69 64 65 6e 74 69 74 79 | 2d 6c 69 6e 6b 20 5c 5c |identity|-link \\|
|000052f0| 0d 4c 6f 67 61 72 69 74 | 68 6d 20 20 20 26 20 24 |.Logarit|hm & $|
|00005300| 5c 6c 6f 67 20 5c 6d 75 | 24 20 26 20 24 28 30 2c |\log \mu|$ & $(0,|
|00005310| 20 5c 69 6e 66 74 79 29 | 24 20 20 20 20 20 26 20 | \infty)|$ & |
|00005320| 5c 74 74 20 6c 6f 67 2d | 6c 69 6e 6b 5c 5c 0d 49 |\tt log-|link\\.I|
|00005330| 6e 76 65 72 73 65 20 20 | 20 20 20 26 20 24 20 31 |nverse | & $ 1|
|00005340| 2f 5c 6d 75 24 20 20 20 | 26 20 24 28 30 2c 20 5c |/\mu$ |& $(0, \|
|00005350| 69 6e 66 74 79 29 24 20 | 26 20 5c 74 74 20 69 6e |infty)$ |& \tt in|
|00005360| 76 65 72 73 65 2d 6c 69 | 6e 6b 5c 5c 0d 53 71 75 |verse-li|nk\\.Squ|
|00005370| 61 72 65 20 52 6f 6f 74 | 20 26 20 24 5c 73 71 72 |are Root| & $\sqr|
|00005380| 74 7b 5c 6d 75 7d 24 20 | 26 20 24 28 30 2c 20 5c |t{\mu}$ |& $(0, \|
|00005390| 69 6e 66 74 79 29 24 20 | 26 20 5c 74 74 20 73 71 |infty)$ |& \tt sq|
|000053a0| 72 74 2d 6c 69 6e 6b 5c | 5c 0d 4c 6f 67 69 74 20 |rt-link\|\.Logit |
|000053b0| 20 20 20 20 20 20 26 20 | 24 5c 6c 6f 67 5c 66 72 | & |$\log\fr|
|000053c0| 61 63 7b 5c 6d 75 7d 7b | 31 2d 5c 6d 75 7d 24 20 |ac{\mu}{|1-\mu}$ |
|000053d0| 26 20 24 5b 30 2c 31 5d | 24 20 26 20 5c 74 74 20 |& $[0,1]|$ & \tt |
|000053e0| 6c 6f 67 69 74 2d 6c 69 | 6e 6b 5c 5c 0d 50 72 6f |logit-li|nk\\.Pro|
|000053f0| 62 69 74 20 20 20 20 20 | 20 26 20 24 5c 50 68 69 |bit | & $\Phi|
|00005400| 5e 7b 2d 31 7d 28 5c 6d | 75 29 24 20 26 20 24 5b |^{-1}(\m|u)$ & $[|
|00005410| 30 2c 31 5d 24 20 26 20 | 5c 74 74 20 70 72 6f 62 |0,1]$ & |\tt prob|
|00005420| 69 74 2d 6c 69 6e 6b 5c | 5c 0d 43 6f 6d 70 6c 2e |it-link\|\.Compl.|
|00005430| 20 6c 6f 67 2d 6c 6f 67 | 20 26 20 24 5c 6c 6f 67 | log-log| & $\log|
|00005440| 28 2d 5c 6c 6f 67 28 31 | 2d 5c 6d 75 29 29 24 20 |(-\log(1|-\mu))$ |
|00005450| 26 20 24 5b 30 2c 31 5d | 24 20 26 20 5c 74 74 20 |& $[0,1]|$ & \tt |
|00005460| 63 6c 6f 67 6c 6f 67 2d | 6c 69 6e 6b 5c 5c 0d 50 |cloglog-|link\\.P|
|00005470| 6f 77 65 72 20 20 20 20 | 20 20 20 26 20 24 5c 6d |ower | & $\m|
|00005480| 75 5e 7b 6b 7d 24 20 26 | 20 24 28 30 2c 20 5c 69 |u^{k}$ &| $(0, \i|
|00005490| 6e 66 74 79 29 24 20 26 | 20 5c 74 74 20 28 73 65 |nfty)$ &| \tt (se|
|000054a0| 6e 64 20 70 6f 77 65 72 | 2d 6c 69 6e 6b 2d 70 72 |nd power|-link-pr|
|000054b0| 6f 74 6f 20 3a 6e 65 77 | 20 5c 70 61 72 61 6d 7b |oto :new| \param{|
|000054c0| 6b 7d 29 5c 5c 0d 5c 68 | 6c 69 6e 65 0d 5c 65 6e |k})\\.\h|line.\en|
|000054d0| 64 7b 74 61 62 75 6c 61 | 72 7d 0d 5c 65 6e 64 7b |d{tabula|r}.\end{|
|000054e0| 63 65 6e 74 65 72 7d 0d | 5c 65 6e 64 7b 74 61 62 |center}.|\end{tab|
|000054f0| 6c 65 7d 0d 57 69 74 68 | 20 6f 6e 65 20 65 78 63 |le}.With| one exc|
|00005500| 65 70 74 69 6f 6e 2c 20 | 74 68 65 20 70 72 65 2d |eption, |the pre-|
|00005510| 64 65 66 69 6e 65 64 20 | 6c 69 6e 6b 73 20 72 65 |defined |links re|
|00005520| 71 75 69 72 65 20 6e 6f | 20 70 61 72 61 6d 65 74 |quire no| paramet|
|00005530| 65 72 73 2e 0d 54 68 65 | 73 65 20 6c 69 6e 6b 20 |ers..The|se link |
|00005540| 6f 62 6a 65 63 74 73 20 | 63 61 6e 20 74 68 65 72 |objects |can ther|
|00005550| 65 66 6f 72 65 20 62 65 | 20 73 68 61 72 65 64 20 |efore be| shared |
|00005560| 61 6d 6f 6e 67 20 6d 6f | 64 65 6c 73 2e 20 54 68 |among mo|dels. Th|
|00005570| 65 20 65 78 63 65 70 74 | 69 6f 6e 0d 69 73 20 74 |e except|ion.is t|
|00005580| 68 65 20 70 6f 77 65 72 | 20 6c 69 6e 6b 2e 20 4c |he power| link. L|
|00005590| 69 6e 6b 73 20 66 6f 72 | 20 62 69 6e 6f 6d 69 61 |inks for| binomia|
|000055a0| 6c 20 6d 6f 64 65 6c 73 | 20 61 72 65 20 64 65 66 |l models| are def|
|000055b0| 69 6e 65 64 20 66 6f 72 | 20 24 6e 20 3d 20 31 24 |ined for| $n = 1$|
|000055c0| 0d 74 72 69 61 6c 73 20 | 61 6e 64 20 61 73 73 75 |.trials |and assu|
|000055d0| 6d 65 20 24 30 20 3c 20 | 5c 6d 75 20 3c 20 31 24 |me $0 < |\mu < 1$|
|000055e0| 2e 0d 0d 4c 69 6e 6b 20 | 6f 62 6a 65 63 74 73 20 |...Link |objects |
|000055f0| 69 6e 68 65 72 69 74 20 | 66 72 6f 6d 20 74 68 65 |inherit |from the|
|00005600| 20 5c 64 63 6f 64 65 7b | 67 6c 69 6d 2d 6c 69 6e | \dcode{|glim-lin|
|00005610| 6b 2d 70 72 6f 74 6f 7d | 20 70 72 6f 74 6f 74 79 |k-proto}| prototy|
|00005620| 70 65 2e 20 20 54 68 65 | 0d 5c 64 63 6f 64 65 7b |pe. The|.\dcode{|
|00005630| 6c 6f 67 2d 6c 69 6e 6b | 7d 20 6f 62 6a 65 63 74 |log-link|} object|
|00005640| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 |, for ex|ample, i|
|00005650| 73 20 63 6f 6e 73 74 72 | 75 63 74 65 64 20 62 79 |s constr|ucted by|
|00005660| 0d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00005670| 7d 0d 28 64 65 66 70 72 | 6f 74 6f 20 6c 6f 67 2d |}.(defpr|oto log-|
|00005680| 6c 69 6e 6b 20 28 29 20 | 28 29 20 67 6c 69 6d 2d |link () |() glim-|
|00005690| 6c 69 6e 6b 2d 70 72 6f | 74 6f 29 0d 5c 65 6e 64 |link-pro|to).\end|
|000056a0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 53 69 6e 63 65 |{verbati|m}.Since|
|000056b0| 20 74 68 69 73 20 70 72 | 6f 74 6f 74 79 70 65 20 | this pr|ototype |
|000056c0| 63 61 6e 20 62 65 20 75 | 73 65 64 20 64 69 72 65 |can be u|sed dire|
|000056d0| 63 74 6c 79 20 69 6e 20 | 6d 6f 64 65 6c 20 6f 62 |ctly in |model ob|
|000056e0| 6a 65 63 74 73 2c 20 74 | 68 65 0d 63 6f 6e 76 65 |jects, t|he.conve|
|000056f0| 6e 74 69 6f 6e 20 6f 66 | 20 68 61 76 69 6e 67 20 |ntion of| having |
|00005700| 70 72 6f 74 6f 74 79 70 | 65 20 6e 61 6d 65 73 20 |prototyp|e names |
|00005710| 65 6e 64 20 69 6e 20 5c | 64 63 6f 64 65 7b 2d 70 |end in \|dcode{-p|
|00005720| 72 6f 74 6f 7d 20 69 73 | 20 6e 6f 74 0d 75 73 65 |roto} is| not.use|
|00005730| 64 2e 20 54 68 65 20 5c | 64 63 6f 64 65 7b 67 6c |d. The \|dcode{gl|
|00005740| 69 6d 2d 6c 69 6e 6b 2d | 70 72 6f 74 6f 7d 20 70 |im-link-|proto} p|
|00005750| 72 6f 74 6f 74 79 70 65 | 20 70 72 6f 76 69 64 65 |rototype| provide|
|00005760| 73 20 61 20 5c 64 63 6f | 64 65 7b 3a 70 72 69 6e |s a \dco|de{:prin|
|00005770| 74 7d 0d 6d 65 74 68 6f | 64 20 74 68 61 74 20 73 |t}.metho|d that s|
|00005780| 68 6f 75 6c 64 20 77 6f | 72 6b 20 66 6f 72 20 6d |hould wo|rk for m|
|00005790| 6f 73 74 20 6c 69 6e 6b | 20 66 75 6e 63 74 69 6f |ost link| functio|
|000057a0| 6e 73 2e 20 54 68 65 20 | 5c 64 63 6f 64 65 7b 6c |ns. The |\dcode{l|
|000057b0| 6f 67 2d 6c 69 6e 6b 7d | 0d 6f 62 6a 65 63 74 20 |og-link}|.object |
|000057c0| 70 72 69 6e 74 73 20 61 | 73 0d 5c 62 65 67 69 6e |prints a|s.\begin|
|000057d0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 3e 20 6c 6f 67 |{verbati|m}.> log|
|000057e0| 2d 6c 69 6e 6b 0d 23 3c | 47 6c 69 6d 20 4c 69 6e |-link.#<|Glim Lin|
|000057f0| 6b 20 4f 62 6a 65 63 74 | 3a 20 4c 4f 47 2d 4c 49 |k Object|: LOG-LI|
|00005800| 4e 4b 3e 0d 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 |NK>.\end|{verbati|
|00005810| 6d 7d 0d 0d 54 68 65 20 | 5c 64 63 6f 64 65 7b 67 |m}..The |\dcode{g|
|00005820| 6c 69 6d 2d 70 72 6f 74 | 6f 7d 20 63 6f 6d 70 75 |lim-prot|o} compu|
|00005830| 74 69 6e 67 20 6d 65 74 | 68 6f 64 73 20 61 73 73 |ting met|hods ass|
|00005840| 75 6d 65 20 74 68 61 74 | 20 61 20 6c 69 6e 6b 20 |ume that| a link |
|00005850| 6f 62 6a 65 63 74 0d 72 | 65 73 70 6f 6e 64 73 20 |object.r|esponds |
|00005860| 74 6f 20 74 68 72 65 65 | 20 6d 65 73 73 61 67 65 |to three| message|
|00005870| 73 3a 0d 5c 62 65 67 69 | 6e 7b 66 6c 75 73 68 6c |s:.\begi|n{flushl|
|00005880| 65 66 74 7d 5c 74 74 0d | 28 73 65 6e 64 20 5c 70 |eft}\tt.|(send \p|
|00005890| 61 72 61 6d 7b 6c 69 6e | 6b 7d 20 3a 65 74 61 20 |aram{lin|k} :eta |
|000058a0| 5c 70 61 72 61 6d 7b 6d | 75 7d 29 5c 5c 0d 28 73 |\param{m|u})\\.(s|
|000058b0| 65 6e 64 20 5c 70 61 72 | 61 6d 7b 6c 69 6e 6b 7d |end \par|am{link}|
|000058c0| 20 3a 6d 65 61 6e 73 20 | 5c 70 61 72 61 6d 7b 65 | :means |\param{e|
|000058d0| 74 61 7d 29 5c 5c 0d 28 | 73 65 6e 64 20 5c 70 61 |ta})\\.(|send \pa|
|000058e0| 72 61 6d 7b 6c 69 6e 6b | 7d 20 3a 64 65 72 69 76 |ram{link|} :deriv|
|000058f0| 73 20 5c 70 61 72 61 6d | 7b 6d 75 7d 29 0d 5c 65 |s \param|{mu}).\e|
|00005900| 6e 64 7b 66 6c 75 73 68 | 6c 65 66 74 7d 0d 54 68 |nd{flush|left}.Th|
|00005910| 65 20 5c 64 63 6f 64 65 | 7b 3a 65 74 61 7d 20 6d |e \dcode|{:eta} m|
|00005920| 65 74 68 6f 64 20 72 65 | 74 75 72 6e 73 20 61 20 |ethod re|turns a |
|00005930| 73 65 71 75 65 6e 63 65 | 20 6f 66 20 6c 69 6e 65 |sequence| of line|
|00005940| 61 72 20 70 72 65 64 69 | 63 74 6f 72 20 76 61 6c |ar predi|ctor val|
|00005950| 75 65 73 0d 66 6f 72 20 | 61 20 70 61 72 74 69 63 |ues.for |a partic|
|00005960| 75 6c 61 72 20 6d 65 61 | 6e 20 73 65 71 75 65 6e |ular mea|n sequen|
|00005970| 63 65 2e 20 54 68 65 20 | 5c 64 63 6f 64 65 7b 3a |ce. The |\dcode{:|
|00005980| 6d 65 61 6e 73 7d 20 6d | 65 74 68 6f 64 20 69 73 |means} m|ethod is|
|00005990| 20 74 68 65 0d 69 6e 76 | 65 72 73 65 20 6f 66 20 | the.inv|erse of |
|000059a0| 5c 64 63 6f 64 65 7b 3a | 65 74 61 7d 3a 20 69 74 |\dcode{:|eta}: it|
|000059b0| 20 72 65 74 75 72 6e 73 | 20 6d 65 61 6e 20 76 61 | returns| mean va|
|000059c0| 6c 75 65 73 20 66 6f 72 | 20 73 70 65 63 69 66 69 |lues for| specifi|
|000059d0| 65 64 20 76 61 6c 75 65 | 73 0d 6f 66 20 74 68 65 |ed value|s.of the|
|000059e0| 20 6c 69 6e 65 61 72 20 | 70 72 65 64 69 63 74 6f | linear |predicto|
|000059f0| 72 2e 20 54 68 65 20 5c | 64 63 6f 64 65 7b 3a 64 |r. The \|dcode{:d|
|00005a00| 65 72 69 76 73 7d 20 6d | 65 74 68 6f 64 20 72 65 |erivs} m|ethod re|
|00005a10| 74 75 72 6e 73 20 74 68 | 65 20 76 61 6c 75 65 73 |turns th|e values|
|00005a20| 20 6f 66 0d 5c 62 65 67 | 69 6e 7b 64 69 73 70 6c | of.\beg|in{displ|
|00005a30| 61 79 6d 61 74 68 7d 0d | 5c 66 72 61 63 7b 64 5c |aymath}.|\frac{d\|
|00005a40| 65 74 61 7d 7b 64 5c 6d | 75 7d 0d 5c 65 6e 64 7b |eta}{d\m|u}.\end{|
|00005a50| 64 69 73 70 6c 61 79 6d | 61 74 68 7d 0d 61 74 20 |displaym|ath}.at |
|00005a60| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 6d 65 |the spec|ified me|
|00005a70| 61 6e 20 76 61 6c 75 65 | 73 2e 20 41 73 20 61 6e |an value|s. As an|
|00005a80| 20 65 78 61 6d 70 6c 65 | 2c 20 66 6f 72 20 74 68 | example|, for th|
|00005a90| 65 20 5c 64 63 6f 64 65 | 7b 6c 6f 67 2d 6c 69 6e |e \dcode|{log-lin|
|00005aa0| 6b 7d 0d 6f 62 6a 65 63 | 74 20 74 68 65 73 65 20 |k}.objec|t these |
|00005ab0| 74 68 72 65 65 20 6d 65 | 74 68 6f 64 73 20 61 72 |three me|thods ar|
|00005ac0| 65 20 64 65 66 69 6e 65 | 64 20 61 73 0d 5c 62 65 |e define|d as.\be|
|00005ad0| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0d 28 64 |gin{verb|atim}.(d|
|00005ae0| 65 66 6d 65 74 68 20 6c | 6f 67 2d 6c 69 6e 6b 20 |efmeth l|og-link |
|00005af0| 3a 65 74 61 20 28 6d 75 | 29 20 28 6c 6f 67 20 6d |:eta (mu|) (log m|
|00005b00| 75 29 29 0d 28 64 65 66 | 6d 65 74 68 20 6c 6f 67 |u)).(def|meth log|
|00005b10| 2d 6c 69 6e 6b 20 3a 6d | 65 61 6e 73 20 28 65 74 |-link :m|eans (et|
|00005b20| 61 29 20 28 65 78 70 20 | 65 74 61 29 29 0d 28 64 |a) (exp |eta)).(d|
|00005b30| 65 66 6d 65 74 68 20 6c | 6f 67 2d 6c 69 6e 6b 20 |efmeth l|og-link |
|00005b40| 3a 64 65 72 69 76 73 20 | 28 6d 75 29 20 28 2f 20 |:derivs |(mu) (/ |
|00005b50| 6d 75 29 29 0d 5c 65 6e | 64 7b 76 65 72 62 61 74 |mu)).\en|d{verbat|
|00005b60| 69 6d 7d 0d 0d 41 6c 74 | 65 72 6e 61 74 69 76 65 |im}..Alt|ernative|
|00005b70| 20 6c 69 6e 6b 20 73 74 | 72 75 63 74 75 72 65 73 | link st|ructures|
|00005b80| 20 63 61 6e 20 62 65 20 | 63 6f 6e 73 74 72 75 63 | can be |construc|
|00005b90| 74 65 64 20 62 79 20 73 | 65 74 74 69 6e 67 20 75 |ted by s|etting u|
|00005ba0| 70 20 61 20 6e 65 77 0d | 70 72 6f 74 6f 74 79 70 |p a new.|prototyp|
|00005bb0| 65 20 61 6e 64 20 64 65 | 66 69 6e 69 6e 67 20 61 |e and de|fining a|
|00005bc0| 70 70 72 6f 70 72 69 61 | 74 65 20 5c 64 63 6f 64 |ppropria|te \dcod|
|00005bd0| 65 7b 3a 65 74 61 7d 2c | 20 5c 64 63 6f 64 65 7b |e{:eta},| \dcode{|
|00005be0| 3a 6d 65 61 6e 73 7d 2c | 20 61 6e 64 0d 5c 64 63 |:means},| and.\dc|
|00005bf0| 6f 64 65 7b 3a 64 65 72 | 69 76 73 7d 20 6d 65 74 |ode{:der|ivs} met|
|00005c00| 68 6f 64 73 2e 20 50 61 | 72 61 6d 65 74 72 69 63 |hods. Pa|rametric|
|00005c10| 20 6c 69 6e 6b 20 66 61 | 6d 69 6c 69 65 73 20 63 | link fa|milies c|
|00005c20| 61 6e 20 62 65 20 69 6d | 70 6c 65 6d 65 6e 74 65 |an be im|plemente|
|00005c30| 64 20 62 79 0d 70 72 6f | 76 69 64 69 6e 67 20 6f |d by.pro|viding o|
|00005c40| 6e 65 20 6f 72 20 6d 6f | 72 65 20 73 6c 6f 74 73 |ne or mo|re slots|
|00005c50| 20 66 6f 72 20 68 6f 6c | 64 69 6e 67 20 74 68 65 | for hol|ding the|
|00005c60| 20 70 61 72 61 6d 65 74 | 65 72 73 2e 20 54 68 65 | paramet|ers. The|
|00005c70| 20 70 6f 77 65 72 20 6c | 69 6e 6b 0d 69 73 20 61 | power l|ink.is a|
|00005c80| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 61 20 70 |n exampl|e of a p|
|00005c90| 61 72 61 6d 65 74 72 69 | 63 20 6c 69 6e 6b 20 66 |arametri|c link f|
|00005ca0| 61 6d 69 6c 79 2e 20 54 | 68 65 20 70 6f 77 65 72 |amily. T|he power|
|00005cb0| 20 6c 69 6e 6b 20 70 72 | 6f 74 6f 74 79 70 65 0d | link pr|ototype.|
|00005cc0| 69 73 20 64 65 66 69 6e | 65 64 20 61 73 0d 5c 62 |is defin|ed as.\b|
|00005cd0| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0d 28 |egin{ver|batim}.(|
|00005ce0| 64 65 66 70 72 6f 74 6f | 20 70 6f 77 65 72 2d 6c |defproto| power-l|
|00005cf0| 69 6e 6b 2d 70 72 6f 74 | 6f 20 27 28 70 6f 77 65 |ink-prot|o '(powe|
|00005d00| 72 29 20 28 29 20 67 6c | 69 6d 2d 6c 69 6e 6b 2d |r) () gl|im-link-|
|00005d10| 70 72 6f 74 6f 29 0d 5c | 65 6e 64 7b 76 65 72 62 |proto).\|end{verb|
|00005d20| 61 74 69 6d 7d 0d 54 68 | 65 20 73 6c 6f 74 20 5c |atim}.Th|e slot \|
|00005d30| 64 63 6f 64 65 7b 70 6f | 77 65 72 7d 20 68 6f 6c |dcode{po|wer} hol|
|00005d40| 64 73 20 74 68 65 20 70 | 6f 77 65 72 20 65 78 70 |ds the p|ower exp|
|00005d50| 6f 6e 65 6e 74 2e 20 41 | 6e 20 61 63 63 65 73 73 |onent. A|n access|
|00005d60| 6f 72 20 6d 65 74 68 6f | 64 0d 69 73 20 64 65 66 |or metho|d.is def|
|00005d70| 69 6e 65 64 20 62 79 0d | 5c 62 65 67 69 6e 7b 76 |ined by.|\begin{v|
|00005d80| 65 72 62 61 74 69 6d 7d | 0d 28 64 65 66 6d 65 74 |erbatim}|.(defmet|
|00005d90| 68 20 70 6f 77 65 72 2d | 6c 69 6e 6b 2d 70 72 6f |h power-|link-pro|
|00005da0| 74 6f 20 3a 70 6f 77 65 | 72 20 28 29 20 28 73 6c |to :powe|r () (sl|
|00005db0| 6f 74 2d 76 61 6c 75 65 | 20 27 70 6f 77 65 72 29 |ot-value| 'power)|
|00005dc0| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|00005dd0| 0d 61 6e 64 20 74 68 65 | 20 5c 64 63 6f 64 65 7b |.and the| \dcode{|
|00005de0| 3a 69 73 6e 65 77 7d 20 | 69 6e 69 74 69 61 6c 69 |:isnew} |initiali|
|00005df0| 7a 61 74 69 6f 6e 20 6d | 65 74 68 6f 64 20 69 73 |zation m|ethod is|
|00005e00| 20 64 65 66 69 6e 65 64 | 20 74 6f 20 72 65 71 75 | defined| to requ|
|00005e10| 69 72 65 20 61 0d 70 6f | 77 65 72 20 61 72 67 75 |ire a.po|wer argu|
|00005e20| 6d 65 6e 74 3a 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |ment:.\b|egin{ver|
|00005e30| 62 61 74 69 6d 7d 0d 28 | 64 65 66 6d 65 74 68 20 |batim}.(|defmeth |
|00005e40| 70 6f 77 65 72 2d 6c 69 | 6e 6b 2d 70 72 6f 74 6f |power-li|nk-proto|
|00005e50| 20 3a 69 73 6e 65 77 20 | 28 70 6f 77 65 72 29 20 | :isnew |(power) |
|00005e60| 28 73 65 74 66 20 28 73 | 6c 6f 74 2d 76 61 6c 75 |(setf (s|lot-valu|
|00005e70| 65 20 27 70 6f 77 65 72 | 29 20 70 6f 77 65 72 29 |e 'power|) power)|
|00005e80| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|00005e90| 0d 54 68 75 73 20 61 20 | 70 6f 77 65 72 20 6c 69 |.Thus a |power li|
|00005ea0| 6e 6b 20 66 6f 72 20 61 | 20 70 61 72 74 69 63 75 |nk for a| particu|
|00005eb0| 6c 61 72 20 65 78 70 6f | 6e 65 6e 74 2c 20 73 61 |lar expo|nent, sa|
|00005ec0| 79 20 74 68 65 20 65 78 | 70 6f 6e 65 6e 74 20 32 |y the ex|ponent 2|
|00005ed0| 2c 20 63 61 6e 0d 62 65 | 20 63 6f 6e 73 74 72 75 |, can.be| constru|
|00005ee0| 63 74 65 64 20 75 73 69 | 6e 67 20 74 68 65 20 65 |cted usi|ng the e|
|00005ef0| 78 70 72 65 73 73 69 6f | 6e 0d 5c 62 65 67 69 6e |xpressio|n.\begin|
|00005f00| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 28 73 65 6e 64 |{verbati|m}.(send|
|00005f10| 20 70 6f 77 65 72 2d 6c | 69 6e 6b 2d 70 72 6f 74 | power-l|ink-prot|
|00005f20| 6f 20 3a 6e 65 77 20 32 | 29 0d 5c 65 6e 64 7b 76 |o :new 2|).\end{v|
|00005f30| 65 72 62 61 74 69 6d 7d | 0d 0d 54 6f 20 63 6f 6d |erbatim}|..To com|
|00005f40| 70 6c 65 74 65 20 74 68 | 65 20 70 6f 77 65 72 20 |plete th|e power |
|00005f50| 6c 69 6e 6b 20 70 72 6f | 74 6f 74 79 70 65 2c 20 |link pro|totype, |
|00005f60| 77 65 20 6e 65 65 64 20 | 74 6f 20 64 65 66 69 6e |we need |to defin|
|00005f70| 65 20 74 68 65 20 74 68 | 72 65 65 0d 72 65 71 75 |e the th|ree.requ|
|00005f80| 69 72 65 64 20 6d 65 74 | 68 6f 64 73 2e 20 54 68 |ired met|hods. Th|
|00005f90| 65 79 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 61 |ey are d|efined a|
|00005fa0| 73 0d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |s.\begin|{verbati|
|00005fb0| 6d 7d 0d 28 64 65 66 6d | 65 74 68 20 70 6f 77 65 |m}.(defm|eth powe|
|00005fc0| 72 2d 6c 69 6e 6b 2d 70 | 72 6f 74 6f 20 3a 65 74 |r-link-p|roto :et|
|00005fd0| 61 20 28 6d 75 29 20 28 | 5e 20 6d 75 20 28 73 65 |a (mu) (|^ mu (se|
|00005fe0| 6e 64 20 73 65 6c 66 20 | 3a 70 6f 77 65 72 29 29 |nd self |:power))|
|00005ff0| 29 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |).\end{v|erbatim}|
|00006000| 0d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00006010| 7d 0d 28 64 65 66 6d 65 | 74 68 20 70 6f 77 65 72 |}.(defme|th power|
|00006020| 2d 6c 69 6e 6b 2d 70 72 | 6f 74 6f 20 3a 6d 65 61 |-link-pr|oto :mea|
|00006030| 6e 73 20 28 65 74 61 29 | 20 28 5e 20 65 74 61 20 |ns (eta)| (^ eta |
|00006040| 28 2f 20 28 73 6c 6f 74 | 2d 76 61 6c 75 65 20 27 |(/ (slot|-value '|
|00006050| 70 6f 77 65 72 29 29 29 | 29 0d 5c 65 6e 64 7b 76 |power)))|).\end{v|
|00006060| 65 72 62 61 74 69 6d 7d | 0d 61 6e 64 0d 5c 62 65 |erbatim}|.and.\be|
|00006070| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0d 28 64 |gin{verb|atim}.(d|
|00006080| 65 66 6d 65 74 68 20 70 | 6f 77 65 72 2d 6c 69 6e |efmeth p|ower-lin|
|00006090| 6b 2d 70 72 6f 74 6f 20 | 3a 64 65 72 69 76 73 20 |k-proto |:derivs |
|000060a0| 28 6d 75 29 0d 20 20 28 | 6c 65 74 20 28 28 70 20 |(mu). (|let ((p |
|000060b0| 28 73 6c 6f 74 2d 76 61 | 6c 75 65 20 27 70 6f 77 |(slot-va|lue 'pow|
|000060c0| 65 72 29 29 29 0d 20 20 | 20 20 28 2a 20 70 20 28 |er))). | (* p (|
|000060d0| 5e 20 6d 75 20 28 2d 20 | 70 20 31 29 29 29 29 29 |^ mu (- |p 1)))))|
|000060e0| 0d 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|000060f0| 54 68 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |The defi|nition o|
|00006100| 66 20 74 68 65 20 5c 64 | 63 6f 64 65 7b 3a 6d 65 |f the \d|code{:me|
|00006110| 61 6e 73 7d 20 6d 65 74 | 68 6f 64 20 63 6f 75 6c |ans} met|hod coul|
|00006120| 64 20 62 65 20 69 6d 70 | 72 6f 76 65 64 20 74 6f |d be imp|roved to|
|00006130| 20 61 6c 6c 6f 77 0d 6e | 65 67 61 74 69 76 65 20 | allow.n|egative |
|00006140| 61 72 67 75 6d 65 6e 74 | 73 20 77 68 65 6e 20 74 |argument|s when t|
|00006150| 68 65 20 70 6f 77 65 72 | 20 69 73 20 61 6e 20 6f |he power| is an o|
|00006160| 64 64 20 69 6e 74 65 67 | 65 72 2e 20 46 69 6e 61 |dd integ|er. Fina|
|00006170| 6c 6c 79 2c 20 74 68 65 | 0d 5c 64 63 6f 64 65 7b |lly, the|.\dcode{|
|00006180| 3a 70 72 69 6e 74 7d 20 | 6d 65 74 68 6f 64 20 69 |:print} |method i|
|00006190| 73 20 72 65 64 65 66 69 | 6e 65 64 20 74 6f 20 72 |s redefi|ned to r|
|000061a0| 65 66 6c 65 63 74 20 74 | 68 65 20 76 61 6c 75 65 |eflect t|he value|
|000061b0| 20 6f 66 20 74 68 65 0d | 65 78 70 6f 6e 65 6e 74 | of the.|exponent|
|000061c0| 3a 0d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |:.\begin|{verbati|
|000061d0| 6d 7d 0d 28 64 65 66 6d | 65 74 68 20 70 6f 77 65 |m}.(defm|eth powe|
|000061e0| 72 2d 6c 69 6e 6b 2d 70 | 72 6f 74 6f 20 3a 70 72 |r-link-p|roto :pr|
|000061f0| 69 6e 74 20 28 26 6f 70 | 74 69 6f 6e 61 6c 20 28 |int (&op|tional (|
|00006200| 73 74 72 65 61 6d 20 74 | 29 29 0d 20 20 28 66 6f |stream t|)). (fo|
|00006210| 72 6d 61 74 20 73 74 72 | 65 61 6d 20 60 60 23 3c |rmat str|eam ``#<|
|00006220| 47 6c 69 6d 20 4c 69 6e | 6b 20 4f 62 6a 65 63 74 |Glim Lin|k Object|
|00006230| 3a 20 50 6f 77 65 72 20 | 4c 69 6e 6b 20 28 7e 73 |: Power |Link (~s|
|00006240| 29 3e 27 27 20 28 73 65 | 6e 64 20 73 65 6c 66 20 |)>'' (se|nd self |
|00006250| 3a 70 6f 77 65 72 29 29 | 29 0d 5c 65 6e 64 7b 76 |:power))|).\end{v|
|00006260| 65 72 62 61 74 69 6d 7d | 0d 54 68 75 73 20 61 20 |erbatim}|.Thus a |
|00006270| 73 71 75 61 72 65 20 6c | 69 6e 6b 20 70 72 69 6e |square l|ink prin|
|00006280| 74 73 20 61 73 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |ts as.\b|egin{ver|
|00006290| 62 61 74 69 6d 7d 0d 3e | 20 28 73 65 6e 64 20 70 |batim}.>| (send p|
|000062a0| 6f 77 65 72 2d 6c 69 6e | 6b 2d 70 72 6f 74 6f 20 |ower-lin|k-proto |
|000062b0| 3a 6e 65 77 20 32 29 0d | 23 3c 47 6c 69 6d 20 4c |:new 2).|#<Glim L|
|000062c0| 69 6e 6b 20 4f 62 6a 65 | 63 74 3a 20 50 6f 77 65 |ink Obje|ct: Powe|
|000062d0| 72 20 4c 69 6e 6b 20 28 | 32 29 3e 0d 5c 65 6e 64 |r Link (|2)>.\end|
|000062e0| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 0d 5c 73 65 63 |{verbati|m}..\sec|
|000062f0| 74 69 6f 6e 7b 46 69 74 | 74 69 6e 67 20 61 20 42 |tion{Fit|ting a B|
|00006300| 72 61 64 6c 65 79 2d 54 | 65 72 72 79 20 4d 6f 64 |radley-T|erry Mod|
|00006310| 65 6c 7d 0d 4d 61 6e 79 | 20 6d 6f 64 65 6c 73 20 |el}.Many| models |
|00006320| 75 73 65 64 20 69 6e 20 | 63 61 74 65 67 6f 72 69 |used in |categori|
|00006330| 63 61 6c 20 64 61 74 61 | 20 61 6e 61 6c 79 73 69 |cal data| analysi|
|00006340| 73 20 63 61 6e 20 62 65 | 20 76 69 65 77 65 64 20 |s can be| viewed |
|00006350| 61 73 0d 73 70 65 63 69 | 61 6c 20 63 61 73 65 73 |as.speci|al cases|
|00006360| 20 6f 66 20 67 65 6e 65 | 72 61 6c 69 7a 65 64 20 | of gene|ralized |
|00006370| 6c 69 6e 65 61 72 20 6d | 6f 64 65 6c 73 2e 20 4f |linear m|odels. O|
|00006380| 6e 65 20 65 78 61 6d 70 | 6c 65 20 69 73 20 74 68 |ne examp|le is th|
|00006390| 65 0d 42 72 61 64 6c 65 | 79 2d 54 65 72 72 79 20 |e.Bradle|y-Terry |
|000063a0| 6d 6f 64 65 6c 20 66 6f | 72 20 70 61 69 72 65 64 |model fo|r paired|
|000063b0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 73 2e 20 54 68 | compari|sons. Th|
|000063c0| 65 20 42 72 61 64 6c 65 | 79 2d 54 65 72 72 79 20 |e Bradle|y-Terry |
|000063d0| 6d 6f 64 65 6c 0d 64 65 | 61 6c 73 20 77 69 74 68 |model.de|als with|
|000063e0| 20 61 20 73 69 74 75 61 | 74 69 6f 6e 20 69 6e 20 | a situa|tion in |
|000063f0| 77 68 69 63 68 20 24 6e | 24 20 69 6e 64 69 76 69 |which $n|$ indivi|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.